- Joined
- Dec 24, 2013
- Messages
- 394
Rep Bank
$790
$790
User Power: 75%
And realized that the manner he was switching the keys resembled sorting an array.
The keys are arranged in columns of four (4) up to seven (7) rows. Each key is identified with a numeric index; ideally, they are arranged in order. Sometimes, work gets hectic: as keys come in and out, new keys with larger numeric indices may become inserted at the first space available, leaving the rows unsorted. Therefore, the manager gets mad and has to sort the keys again (or I do it, because I become equally as mad).
However, as I observed him switching - or, sorting - the keys, it resembled a technique called insertion sort. The keys are nearly sorted, and thankfully not randomly ordered. As a result, this technique is faster than methods such as heap sort which would have better average-case performance (and worst-case performance) than insertion sort for random containers (and even clearer, reversed containers).
I forget: Here's a pythonic program I wrote demonstrating this. Try it out with various arrays. Here's the main program you use.
The keys are arranged in columns of four (4) up to seven (7) rows. Each key is identified with a numeric index; ideally, they are arranged in order. Sometimes, work gets hectic: as keys come in and out, new keys with larger numeric indices may become inserted at the first space available, leaving the rows unsorted. Therefore, the manager gets mad and has to sort the keys again (or I do it, because I become equally as mad).
However, as I observed him switching - or, sorting - the keys, it resembled a technique called insertion sort. The keys are nearly sorted, and thankfully not randomly ordered. As a result, this technique is faster than methods such as heap sort which would have better average-case performance (and worst-case performance) than insertion sort for random containers (and even clearer, reversed containers).
I forget: Here's a pythonic program I wrote demonstrating this. Try it out with various arrays. Here's the main program you use.
Dislike ads? Become a Fastlane member:
Subscribe today and surround yourself with winners and millionaire mentors, not those broke friends who only want to drink beer and play video games. :-)
Access Restricted: Unlock 1,000,000+ Posts
Stop Peeking Through the Keyhole.
Open the Door.
You hit a wall because the best advice isn't free—it's earned. Since 2007, MJ DeMarco has been active here daily (99.9% active rate), building a war room for entrepreneurs who refuse to settle for mediocrity.
- Active Daily: Life-changing content posted dozens of times every day. No dead threads.
- MJ's Inner Circle: Direct access to the author of The Millionaire Fastlane.
- Vetted Network: Connect with founders scaling to 7 and 8 figures.
- Proven Roadmaps: Strategy over motivation. Execution over "hustle porn."
"SCALED TO 6-FIGURE MONTHS"
"Tips and advice here saved me from huge mistakes, others allowed me to scale my business to 6-figure months."— User MitchC
"INSANE QUALITY OF PEOPLE"
"The number of high quality people I've met from this forum has been insane. All of it predicated on building real value."— User Richard Peck
"You are the average of the five people you surround yourself with."
Are you surrounding yourself with success?
