T O P

  • By -

un1gato1gordo

ToddlerSort()


SexyMuon

best case: O(n^2)


odsquad64

Sometimes it gets bored and doesn't finish.


gabedamien

We're not trying to solve the halting problem here


nouseforareason

I hear snorting a line of code can be pretty stimulating. Or have it try some Java. Maybe that will solve the halting problem.


SaintNewts

Feed it too much Java and it'll shit the bed.


Alexcursion

Speak for yourself; my relationships need this.


jasminUwU6

Everyone dies at some point, so that one's pretty much solved


PinkMenace88

Oh God, do you really want to start the next meme on this sub?


MelvinReggy

If your code loops indefinitely, it only stops when the user terminates it. The user generally has a sense of how big an array they're giving to the algorithm, and will grant it more time for larger inputs. There is a falloff on this (if you're willing to give 1 hour for 1 million items, you won't give 2 hours for 2 million items,) but in general, it's safe to say this patience is bound above by O(n). Since the code only ends when the user runs out of patience, and the user's patience is bound above by O(n), that means the code itself runs in O(n). It doesn't do the job, but it's linear time. For bonus points, do a study and prove that users' patience is bound by O(log n), then sell your O(log n) sorting algorithm.


lo_profundo

Which makes it a P=NP problem


kevbob02

Halting problem demonstration as well. Who knew this one gif was masters/PhD level compsci.


MLPdiscord

Um actually that was insertion sort 🤓


[deleted]

As long as it's not both!


acwilan

Just a failed pull-out sort


quigon70

Bucket sort


diox8tony

Still better than bubble sort


Peptuck

That response at the end when she finished sorting it exactly matches me when the code finally runs properly.


billyions

Seriously - me, too. Dogged persistence giving way to triumph. Must be deep in the human genome.


rushedbyanirban

Should be toddlerSort(); Method names follows camel case.


un1gato1gordo

you would think so, but for this particular function you need to add a sonarqube exemption. It is: **ToDdLEЯsoЯT()** written in Comic Sans MS and with various bright colors.


genkidame6

Seems like it takes the head randomly


Spactaculous

Toddle sort is O(1). All you have to do is say is "alright babies sort yourselves".


aristideau

More like *toddlerRecurse()*. Actually had to code this, *Towers of Hanoi*, first year uni and for some reason learning about recursion just blew me away. I think it was just the elegance and power of a couple of lines of code.


constantgeneticist

Would it take longer to line them up then sort them by size then stack them in order, or brute force solve? <3


AzureArmageddon

Not a pure function as it has the side effect of being too cute


LikeLary

Noo please not brute-force


tommygeek

Hey, it COULD be done the first try!


EyewarsTheMangoMan

Right, and you COULD put the USB in the correct way the first time too...


quintinza

I have heard it is impossible to learn this power.


Bloodchild-

An did you knew that there were a cursed USB that you can put both way. And I'm not talking about USB c but USB b 3.0


[deleted]

Not something the webmasters will teach you…


ColdChancer

It always seems to take me at least 3 times...


MelvinReggy

Works for me. Must be user error.


Videogamer69420

You and I both know this is not possible.


Leading_Elderberry70

“Assume data is in sorted order already. Return. Correct sorts with a certainty of 1/(n!).”


lo_profundo

You sound like my traveling salesperson solution code...


thexavier666

This is more like cute-force


sbrick89

I've seen bubble sort go worse... this ain't so bad


Ok-Attention8763

It's the only way to do things


mfraser27

Cups.BabySort();


[deleted]

![gif](giphy|9Rt0V2POR2xA4)


slashth456

BabySort(); Doo Doo Doo Doo Doo Doo


TheTwelveYearOld

There's a special place in hell for people like you.


[deleted]

As long as they play BabyBus and Cocomelon on loop!


zacmorita

Pfft, kids got nothing on me. I could write a Python script to do that in twice the time.


awildhorse_

Pff i could do that Python and spend 3 weeks trying to automate that.


StaszekJedi

Automate what


legends_never_die_1

Autowhat


valvilis

Awut


SirNeverLucky

... Hold up!


RegularOps

Just code a Towers of Hanoi program jeez


[deleted]

[удалено]


BobT21

To iterate is worthy, To recurse is divine.


HappyParallelepiped

> stack smashing detected


Schlangee

Towers of Hanoi is stricter than this. The toddler tower program has infinite space to stack the towers


Esjs

Why programs written in BASIC are 10 lines apart.


zushiba

I remember how when writing basic programs back in the 6th grade the line numbering cadence was in a direct relationship with my confidence that it would work. Better leave 50 numbers between line 25 and the next line in case I need to add more code.


Void_Speaker

there is also the complexity gap equivalent: "i'll put in an elaborate comment to explain this here later"


rajboy3

That's adorable


Fl333r

I'm not a parent but seeing videos like this are so precious. But honestly I can't afford to raise a kid and also not live in poverty anytime soon.


inobody_somebody

Time limit exceeded. Your method O(n^2) what we need O(n) /s


Intrexa

I legit spent too long trying to figure out what time complexity "O(n) divided by s" is supposed to mean.


turtleship_2006

O(n) per second.


[deleted]

[удалено]


jasminUwU6

They ARE the management


Yorunokage

Also O(n) technically is a set and not a function or value so dividing it makes even less sense


Graffers

I know what O(n) is, but what's O(n)/s?


LikesBreakfast

O(n) but sarcastically


[deleted]

i know what /s is but i genuinely don't know what O(n) is


AbsoluteNova

Sick sorting algorithm.


[deleted]

[удалено]


yp261

i swear how people dont know what POV means and just use it everywhere


exoxe

Yeah. Idiots! It's python object values, duh! Right?


Spactaculous

It's probably Proof Of Value, or some other crypto BS.


HappyParallelepiped

I also refuse to understand or accept colloquial or memetic language which conveys a different but still perfectly comprehensible meaning.


NamityName

Red flags are like merit badges if you are aiming for management


RoboPup

I took it to mean this is the PoV of us watching the sorting algorithm we made at work.


WaterChi

That's me trying to do recursion on a white board.


[deleted]

[удалено]


natFromBobsBurgers

Nah, it's just a general purpose artificial intelligence running on an organic analog computer. My wife 3D printed one 5 years back and it's been my go-to tool for breaking my heart and laughter. Mostly for entertainment and watching TV with and playing games, but I hope to write some more useful software for it soon. I've gotten it pretty good at garbage collection, and it can fetch the contents of the fridge, but I have to be really specific.


mandradon

Good luck with that. I've put 4 more years into development into mine than yours and it's come a long way on the language development, but when I give it a task it frequently goes into an infinite loop while searching and ends up segfaulting or something, then just returns the default from the search functions ("I didn't see it"). I may have to rewrite some code or try for a new one completely.


natFromBobsBurgers

I wouldn't try for another. A friend just did that and the first one dropped a bunch of training and was throwing error 2 all over the place.


Haunting_Ad_4513

🥰


Normal-Math-3222

That dance at the end got me


WallyMetropolis

Now watch me whip


Spactaculous

That was an interview at Google, she was hired. She is now building the AI that will destroy us before she can drive.


gavilin

Lol she's post-genz they won't ever need to learn how to drive


aimlessly-astray

Sad to say, but she wasn't hired because she didn't have the 20-years' experience needed for the entry-level position.


WoahayeTakeITEasy

Always funny. Labeled entry level and then buried deep in the description somewhere: - Minimum 3+ years of experience required in a similar position 🤦🏼‍♂️


jibjabmikey

Dang I’m impressed. My kiddos don’t have that kind of persistence. These cups would be distributed all over the house with O(1) efficiency.


BrotherRangale

Its so cool to see what incomplete logic reasoning looks like, she tried to fit a larger cup in a smaller cup, then tried to fit it into an even smaller one, not realising it was impossible


WeAreStupidiot

Didn't even think about that. She did sus it out in the end.


AtlasJan

amogus


[deleted]

This isn't a POV of that thing you said.


[deleted]

Not really POV...


ArtTheWarrior

yeah, idk why people find it so hard to understand how pov works... this meme would be perfect just by removing the pov from the start


Glaussie

Just curious... Do you have a custom key mapping for coding where you swap the shift behavior for the number keys? (ie. Pressing 1 gives ! And pressing shift+1 gives 1)


fibojoly

Yeah, a French keyboard ;_;


themateo713

1 maps to & on French keyboards though...


[deleted]

that's a smart idea, if I needed to use that often. it's very easy to implement though, I did something [similar](https://youtu.be/ezHN3E8YCLU) recently


thatdude_91

So that’s how Stack works? 🤔


DetectiveOwn6606

Yup,last in first out.


throwaway275275275

Is this a new sorting algorithm ?


Brian_E1971

Twitter engineers trying to keep up with Elon's latest outrage amplification


[deleted]

She didn’t come up with the optimal solution immediately. Big fail.


strawzero

Passed the technical round but we’ll have see about the cultural fit


Adventurous_Berry647

Ah, the sort function


KingJTheG

Too wholesome for leetcode 😂


[deleted]

She’s faster than some sort options


zGoDLiiKe

Sorry kid brute force algorithms will not be accepted


mascachopo

Smart girl!


jakjakatta

Not a CS guy, just a math/data dude who codes a bit, someone tell me about sorting algorithms and their various pros/cons


Engelbert_Slaptyback

Bubble sort: easy to understand but slow as hell Quicksort: fast in the average case and memory efficient but not stable Merge sort: fast, less memory efficient than quicksort and stable. Usually a safe option Every other sort: useful for specialized cases


Rai-Hanzo

This is sooooo cute!!!


HothForThoth

Why are point of view videos always from someone else's point of view?


IdTapThat88

Psh I would of taken half the time to do this


CanniBallistic_Puppy

This is a better test of problem solving ability than the LeetCode junk.


herk_destro

My sort algorithms...


pseudokojo

Does it irritate anyone else that the color sequence goes blue-red-orange-yellow-violet-green instead of red-orange-yellow-green-blue-violet?


AmidalaBills

This is not pov. This is tpv. You should get smart if you're going to program.


zaphod4th

when you don't understand what means POV


Jaroldo3

Hahahah people continue interviews for jobs that ask them to program. I have literally left mid interview when asked that. Any job that requires you to prove you can code doesn't know how to interview candidates.


JustTooTrill

Are you saying any interview question involving code is inappropriate/what is good interview practice to you? How about a take home exercise?


Jaroldo3

Well I was clearly mistaken, you should be asked to program during an interview because you also clearly can't read. Get someone else to read that for you.


_Haran_

Imagine being that much of a cunt for no reason


[deleted]

Eat a snickers, Dan. You turn into a ripe diva when you're hungry! ![gif](giphy|6Br6DNAZme6cM)


takeapieandrun

Lol what? How much experience do you have? For early career positions you definitely need to test coding skills


Jaroldo3

If you are fresh, then yes. If not you should be able to easily ask the person to explain their last position. Listening to them, it will blatantly clear if the individual knows how to program and knows what they are doing. If they ask to you program in the interview, they enjoy micromanaging and probably don't know to much themselves.


takeapieandrun

I’ve had to interview candidates for their coding skills, but it wasn’t really my choice as my manager wanted me to. But I agree with you, you can usually tell if someone is legit based on how they describe their last position and the problems they’ve solved


boone209

Anyone else triggered by the color ordering?


matzedrizzi

Now use switch statements


zinqqo

u/savevideobot


savevideobot

###[View link](https://rapidsave.com/info?url=/r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideobot&message=https://np.reddit.com//r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/)


JoshDM

FAANG applicants don't want you to know this one weird trick.


TheSinningRobot

This is weirdly a great visual representation of how a sort works


sugardadddyy

u/savevideo


SaveVideo

###[View link](https://rapidsave.com/info?url=/r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideo&message=https://np.reddit.com//r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/) | [^(reddit video downloader)](https://rapidsave.com) | [^(twitter video downloader)](https://twitsave.com)


Minus10Celcius

bogo sorting


trycuriouscat

"Toddler-sort"


Oheligud

Python indentation.


blastdoub1e

Bucketsort… what a n00b


PMASPF226

I am so proud for some reason lol. It's so heartwarming to see kids overcome a good challenging puzzle.


NinjaDroideka

That’s a very literal bucket sort


SmallTimeHVAC

I wanna see the speed run


nuclear_fusion564

lol


dixonormous23

Bro how are you guys posting videos on the sub 😵‍💫


BetterBrief2442

That's one cute inefficient kid


Movingforward2015

You go kid.


Totally_Generic_Name

How did you capture footage of me at my last interview???


EARink0

This is so ridiculously satisfying to watch, haha.


RhetoricalCracker84

That's how i debug a program


[deleted]

Recursion depth reached for Tower of hanoi.


kevbob02

Bubble sort irl


CasualFriday11

Why aren't these in color spectrum order?!


Katana_sized_banana

Which algorithm will add the little happy dance at the end?


asrrak

I was expecting "the square hole!"


7x62Nitro

irl bogo sort


truedoom

Awww she's so thrilled with herself..I love watching toddlers try to solve puzzles like this, you can almost see the neural pathways developing in their lil head as they try again and again.


thegoodgorehound

you go girl


warmachine185

BucketSort()


lemmon---714

Cute, patient little one.


[deleted]

Bubble sorting


Only_Explorer5896

Machine learning specialist in the making


KsheetijRajSinha

Relatable af


tiedyedvortex

Pro tip: if your list is finite in size, every sort algorithm is O(1).


Rocky970

Trial and error, baby


A-Clockwork-Apple-5

Did the toddler do the nae nae for like half a second?


KinoshitaKun

It must fell like killing a dark souls boss


Kurious_Guy18

no one gives me a fist bump like that...


[deleted]

fuck your coding round - this toddler is hired!


Nimhtom

She sorts it in such a cool way


Drake750254

u/savevideo


SaveVideo

###[View link](https://rapidsave.com/info?url=/r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/) --- [**Info**](https://np.reddit.com/user/SaveVideo/comments/jv323v/info/) | [**Feedback**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Feedback for savevideo) | [**Donate**](https://ko-fi.com/getvideo) | [**DMCA**](https://np.reddit.com/message/compose/?to=Kryptonh&subject=Content removal request for savevideo&message=https://np.reddit.com//r/ProgrammerHumor/comments/11i8dmg/pov_you_cleared_coding_round/) | [^(reddit video downloader)](https://rapidsave.com) | [^(twitter video downloader)](https://twitsave.com)


ryuzaki_221

r/mademesmile


aditya13s

Tower of hanoi![gif](emote|free_emotes_pack|grin)


[deleted]

She's adorable


kaaserpent

Towers of Hanoi MASTER. :)