JAVA Graph job algorithm implementation, write graphs data structure job

Source: Internet
Author: User

JAVA Graph job algorithm implementation, write graphs data structure job
Lab case–algorithms and Data Structure, 2017-2018
Phase 3. Graphs
Currently, Sharingcar only provides service in ten cities (Madrid, Barcelona,
Valencia, Sevilla, Bilbao, Granada, Toledo, Salamanca, Alicante, Cáceres). Note:you
can ignore the accents.
Every day, Sharingcar creates a map with all it travels offered in order to know
The possible connections between cities.
Implement a graph, whose vertices is the cities (you must use an array of String
To store the vertices. In the this-is-represented by a-index from 0 to 9.
Please, take to account that, for example, the offer (Madrid, Barcelona) are not
Equal to (Barcelona, Madrid). The class must contain the following methods:
? A constructor method that takes an array of cities and build the basic
Structure to create the graph.
? A method, Settravels (Lstrequest offers), that takes a list of offers to create
The edges of the graph with the offered travels. For example, if a offer
Provides a travel between Madrid (0) and Barcelona (1), the method must
Create an edge (with weight equals to 1) between these and vertices. If the
Edge already exists, then the method is only have to increase its associated
Weight. In other words, an edge represents the number of offered travels
From a city to another. Please, explain its time complexity (Big-o function).
? A method, Getlistdestination (String City), which takes a city and returns all
Possible destinations. Please, explain its time complexity (Big-o function).
? A method, Getlistorigin (String City), which takes a city and returns all
Possible origin to the city. Please, explain its time complexity (big-o
function).
? A method, Getallcities (), returning all cities in the graph obtained through
A depth traversal.
? A method, Nonconnectedcities () that returns a list of cities which is not
Connected (there is no path between them). For example, Sevilla is
Connected to Barcelona via Toledo and Madrid, but there are no travel from
Barcelona to Sevilla, so (Barcelona, Sevilla) must is part of the returned list.
? Please, explain the space complexity of your data structure.
Http://www.6daixie.com/contents/18/1374.html

The core staff of the team mainly include Silicon Valley engineers, bat front-line engineers, domestic TOP5 master, PhD students, proficient in German English! Our main business scope is to do programming big homework, curriculum design and so on.

Our Direction field: Window Programming numerical algorithm AI Artificial Intelligence financial statistical Metrology analysis Big Data network programming Web programming Communication Programming game Programming Multimedia Linux plug-in programming API image processing embedded/Microcontroller database programming console process and thread Network security assembly language Hardware programming software Design Engineering Standard Rules. The generation of programming languages or tools including, but not limited to, the following ranges:

C/c++/c# Write

Java Write generation

It generation

Python writes

Tutoring Programming Jobs

The MATLAB Generation writes

Haskell writes

Processing Write

Linux Environment Setup

Rust Generation Write

Data Structure assginment Data structure generation

MIPS Generation Writing

Machine Learning Job Writing

Oracle/sql/postgresql/pig database Generation/Generation/Coaching

Web development, Web development, Web site jobs

Asp. NET Web site development

Finance insurace Statistics Statistics, regression, iteration

Prolog write

Computer Computational Method Generation

Because of professional, so trustworthy. If necessary, please add qq:99515681 or e-mail:[email protected]

: Codinghelp

JAVA Graph job algorithm implementation, write graphs data structure job

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.