Can you give me an example of what a 2^n complexity algorithm would look like?

Posted on 2011-05-04
Last Modified: 2012-05-11
Can you give me an example of what a 2^n complexity algorithm would look like?
Question by:Eindoofus
    LVL 6

    Expert Comment

    LVL 37

    Accepted Solution

    Find a path that hits all nodes in a graph once (travelling salesman problem)

    If you have a box that can hold 100 lbs and you have a bunch of items with varying weights, what is the most that will fit (knapsack problem).

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    sameEnds challenge 25 56
    matchUp  challenge 9 51
    scoreUp challenge 14 40
    mapShare challenge 13 40
    Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
    When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
    The viewer will learn how to implement Singleton Design Pattern in Java.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    728 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

    18 Experts available now in Live!

    Get 1:1 Help Now