Ask Experts Questions for FREE Help !
Ask
    anu12393's Avatar
    anu12393 Posts: 1, Reputation: 1
    New Member
     
    #1

    Jun 7, 2013, 02:07 AM
    Hello Java
    Create a function FindWeightedPath() which wi l l take an ar ray of str ings as input. The structure of the ar ray wi l l be as fol lows: The first
    element in the ar ray wi l l be the number of nodes N (points) in the ar ray as a str ing. The next N elements wi l l be the nodes which can be
    anything (A, B, C. . Street A, Street B. . etc.). Then after the Nth element, the rest of the elements in the ar ray wi l l be the connections
    between al l of the nodes along with their weights (integers) separated by the pipe symbol (| ). They wi l l look l ike this: (A| B| 3, B| C| 12. .
    Street A| Street B| 14. . etc.). Although, there may exist no connections at al l .
    Your function should return the shor test path when the weights are added up from node to node from the first Node to the last Node in the
    ar ray separated by dashes. The output for this ar ray should look l ike A-B-C-D-F-G. There wi l l only ever be one shor test path for the ar ray.
    If no path between the first and last node exists, return -1. The ar ray wi l l at minimum have two nodes. Also, the connection A-B for
    example, means that A can get to B and B can get to A.
    Curlyben's Avatar
    Curlyben Posts: 18,514, Reputation: 1860
    BossMan
     
    #2

    Jun 7, 2013, 02:11 AM
    What do YOU think ?
    While we're happy to HELP we won't do all the work for you.
    Show us what you have done and where you are having problems..

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

About java [ 1 Answers ]

While using a predefined class we should import the packages like import java.io.*,but I have used the predefined class System.out.print without importing any package.. how is it possible.. and how does it works?

Java [ 2 Answers ]

Hey guys, I heard a rumor that Microsoft wasn't going to support Java by the year 2008. Has anyone else heard this? If so, do you know what effect, if any, this willhave on Java programming. What I mean is will Java be phased out or is there a lot more uses for Java. I don't know that much about it...

Java Is used for [ 2 Answers ]

When I rest my pointer over a link, it diplays information about that link Is that Java at work? Why are there different Jav versions? Is Java compiled like C or interpeted like Basic? Is this contained in Internet Explorer? Thank You very much

By using vc++ or java? [ 1 Answers ]

Hi, I want to make image processing application.which programming language I should use? Either vc++ or java or anything else? Please guide me early.


View more questions Search