Đã hoàn thành

java programing related to graph data structure

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] .

Kĩ năng: Java

Xem nhiều hơn: graph data structure text files, graph data structure, application of graph data structure, c# graph data structure, directed graph data structure, graph data structure applications, graph data structure c, graph data structure implementation in c, graph data structure in c, graph data structure in c program, graph data structure in c tutorial, graph data structure in java, graph data structure java, graph data structure tutorial, java graph data structure, java graph data structure example, tree and graph data structure, weighted graph data structure, java graph data structure library, java directed graph data structure

Về Bên Thuê:
( 4 nhận xét ) Kelowna, Canada

ID dự án: #28350119

Được trao cho:


hi. i have experience with graph algorithms. i've read your task. doesn't sound too hard. i can do it.

$60 CAD trong 1 ngày
(20 Đánh Giá)

8 freelancer chào giá trung bình$116 cho công việc này


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

$250 CAD trong 5 ngày
(35 Nhận xét)

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, wh Thêm

$90 CAD trong 3 ngày
(9 Nhận xét)

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 Thêm

$50 CAD trong 2 ngày
(8 Nhận xét)

Hi, there.I CAN START JUST NOW. I am a creative and professional Java and Android developer having more than 5+ years of professional experience as a senior developer in this field. My main areas of expertise are Java, Thêm

$140 CAD trong 2 ngày
(3 Nhận xét)

Hi Dear, I read your description carefully. I understood what you require me to do and I am filled with confidence that I can complete your project wonderfully. I have experience over 5+ years with Java/JavaFX/JavaSwin Thêm

$100 CAD trong 1 ngày
(1 Nhận xét)

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 Thêm

$100 CAD trong 5 ngày
(1 Nhận xét)

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, k Thêm

$140 CAD trong 3 ngày
(2 Nhận xét)