[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
SpongeBob has just finished making n Krabby patties. Whenever
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 14
Thread images: 2
File: sponge-for-hire-4.jpg (122 KB, 1024x768) Image search: [Google]
sponge-for-hire-4.jpg
122 KB, 1024x768
SpongeBob has just finished making n Krabby patties. Whenever a Krabby patty is finished he just throws it into the pile regardless of it's size. However, Mr Krab just gave an order saying that patties should be brought to the customers in descending order !

The patties are too hot for SpongeBob's hands to touch so the way he sorts them is by putting his spatula somewhere in the pile , thus diving it to two smaller piles , and flips the upper pile upside down.

What would be the most efficient way to sort n patties and what would be the efficiency?
>>
Well since n = 1 we don't need to worry about efficiency.
>>
The most efficient choice would be to make a food that required less steps in preparation.
>>
I found a solution for worsr case O (2n-1), can you guys do the same?
>>
>>51270550
Please don't shill your burger house here on /g/ thanks.
>>
>>51270550
This problem is NP hard.
>>
Is this from that fucking SAT book with the Kim Kardashian Ass and shit?
>>
>>51270620
No it isn't
>>
>>51270628
No anon , that's actually a well known math riddle , I just presented it humorously
>>
>>51270629
Yes it is.
>>
>>51270629
http://www.sciencedirect.com/science/article/pii/S0022000015000124?via%3Dihub
>>
>>51270686
You're right . I'm sorry I wasn't sure about what np hard is
>>
>>51270550
Just use a fucking mergesort Spongebob
>>
>>51271598
>memesort
or just quicksort
Thread replies: 14
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.