Posted on 2009-04-15
Last Modified: 2012-05-06
what requirement will you need in order to decide which algorithm  to use.
Question by:elrayiss
    LVL 6

    Expert Comment

    Are you talking about graphs algorithms?
    It depends of you problem, for example if do you want to know all shortest paths from all nodes to all nodes, use the floyd's algorithm, but if you want to know only shortest path from one node to another use Dijkstra's algoritm.

    Author Comment

    yea that and the sorting algorithms depth and breadth and what are the requirements to decide which to use. thank you
    LVL 6

    Expert Comment

    Depth first and breadth first. Also it will depends of you problem, a breadth first algorithm does an exhaustive search of the graph, that is, ALWAYS find the path when it exist.  So if your "search space" is small you can try breadth first, because it use more memory, also if you know that there is a solution. Depth first search tends to require less memory. Depth first is good when there are many possible solutions and you only want one (may be not the shortest one).
    There are many known problems that you use depth and others that you use breadh.
    LVL 6

    Accepted Solution

    I forgot to tell you that Depth first and breadth first are not sorting algorithms, they are search algorithms.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now