Thread: What does "Almost in Order" mean?

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    9

    What does "Almost in Order" mean?

    ????

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What is the context?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    9

    The context

    I am doing an analysis of Selection Sort on an array of 1000 elements. The array is Almost In Order.

  4. #4
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    To the best of my knowledge, there is no technical meaning of the word "almost", so you use the English meaning of the word "almost". Presumably the person asking the question wants you to see what happens when all the elements are in their proper place except, say, the last two (or the first two, or two in the middle, or etc.)

  5. #5
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    I'd say it means it's more than a Little in order but less than Completely in order.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  6. #6
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    "Almost sorted" means that the data has a high degree of sortedness.
    Here are several methods of measuring sortedness:
    http://www.cs.rutgers.edu/~mlittman/...05/node16.html
    Last edited by iMalc; 03-22-2009 at 01:33 AM.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed