BrainDen.com - Brain Teasers

# Pickett

Members

623

8

3. ## Robots on an infinite number line.

EDIT: I also ran my code on Rainman's algorithm above...it appears to also always work. Nice job!

12. ## Cloorsu

Disregard my vowel is ALWAYS yellow comment above...I overlooked some...but they are PREDOMINANTLY yellow...but that could just be coincidence...

19. ## Find Me

Yeah, you're probably closer...more trams and people there...

23. ## Alphabetize my Dvd's

So I agree that in certain sorting algorithms, defining a "step" would be difficult...however, I think with regards to this problem from a practical standpoint, I don't think it's very difficult. A "move" or "step" is simply when you physically grab a DVD and place it in a new position on the shelf...doesn't matter how you do it. In my opinion, if you were to "swap" two DVDs on the shelf (move first to last and last to first)...to me, that is TWO moves, not one. If you decided to do a merge sort on a shelf of DVDs, I would say you are doing a TON of extra moves...while it may be more effici
24. ## Alphabetize my Dvd's

Ok, so I think I mis-interpreted the OP...it states: To arrange my DVDs with precision I will take one DVD off the shelf and place it in the correct spot back on the shelf. If that's the case, let's look at the example of 2, 4, 1, 3: Start with 1...move it to its correct spot (and shift as needed): 1, 2, 4, 3...then try 2...it's already there...then 3, and move it...1, 2, 3, 4...you're done. However, you can also do this by moving the 2 between 1 and 3 initially: 2, 4, 1, 3 --> 4, 1, 2, 3 --> 1, 2, 3, 4... Which of the above is what you would expect from your OP? Ei
25. ## Alphabetize my Dvd's

I may have a small error in my code, I need to double check the results above...
×

• #### Activity

• Riddles
×
• Create New...