You are given a graph data structure in [login to view URL] which maintains an adjacency list of a graph. It supports the ability to add String-type nodes, add edges (by specifying a pair of nodes), test if a node is in the graph, retrieve the list of contacts (friends) of a particular String, and it has a toString() method so you can view the adjacency list of the graph. It does not support deletions, and it requires nodes to be Strings, but this could easily be changed to generic types if you want to use this class for other future uses. You do not have to create any graph functionality here.
You are also given 4 graph files which are simply text files of pairs of names, each pair representing a friendship connection. You are also given a method that reads a graph file and creates the graph object. The sizes of these graphs is in the order graph1, graph2, graph3, graph4. The first file is small enough that you could display the adjacency list and troubleshoot your code development. Perhaps graph2 is small enough too. However, graph4 has almost 9000 edges.
Your task: given a Graph g and a String s, suggest who s might know in g. That is, implement a suggest-a-contact method for a social network. Your method should simply take in a name s and find a person who is not already a friend of s, and has the most number of common friends with s. If there are multiple people who are tied, they should all be returned. Specifically, the suggest() method should return an ArrayList of all suggested friends. The starter code includes a method header for suggest().
A poor solution would be to find every non-friend of s, and then count the number of common friends. This would not scale well when the social network has millions of nodes. The expected solution would find all friends of s, then the friends of the friends, and count from there (this is a breadth-first search which stops after two distance levels).
Several cases are given to you to ensure your code is working properly. For example, in graph1, suggest(g1, “Logan”) should return [“Chloe”]. In graph3, suggest(g3, “Kendra”) should return two names [“Olive”, “Weston”]. Note that this relationship is not commutative: in graph2, suggest(g2, “Thomas”) returns Dylan, but suggest(g2, “Dylan”) returns Paisley.
All your edits should be made in [login to view URL] .
Dear Client, Nice to meet you.
I have read your description and I am so interested in your project.
I am 5+yrs experience in Java.
I have done pacman game, multithread job, catch game, graph problem and also algorithm problems using JavaFX, Swing, also Console, especially i can do your graph job within 2 days.
I ensure the best quality of your project and to keep your deadline.
Hope to discuss with you.
Best regards!
Hi Greetings
I hold extensive experience in developing graph based applications
I can provide quality deliverables meeting your expectations.
please inform timeline and budget
thanks
mds
Hello,
I have reviewed the project description I have skills in: C, C++, C#, Python and Software Architecture.
I have skills with the following programming languages:
C, "C ++", "C #", Python, GO, Matlab, Java, VB, kotlin, JavaScript.
I am a specialized expert. I have 5 years of experience.
Send me details by chat.
I can start right away.
Best regards.
Hello friend,
I appreciate your need to have this service, so don't worry I'll help you make it comfortably. I will be glad if you could provide more details about the project.
Make sure that you will be very happy, when I start working with you, because I can easily do your work according to your requirements, and I'm very good with these kinds of project.
Never hesitate to contact me.
Best regards.
Hello there, how are you? I specialize in large scale, high availability enterprise applications development (Web and Desktop), extensive knowledge of Spring stack and different Spring API-s, development of Spring-boot based micro-service architecture, experience with different AWS API-s and AWS infrastructure setup.
Looking for the soonest reply from you.
Thanks