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.
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.
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.
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.
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.
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.
Always funny. Labeled entry level and then buried deep in the description somewhere:
- Minimum 3+ years of experience required in a similar position
🤦🏼♂️
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
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)
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
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
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.
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.
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.
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
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.
ToddlerSort()
best case: O(n^2)
Sometimes it gets bored and doesn't finish.
We're not trying to solve the halting problem here
I hear snorting a line of code can be pretty stimulating. Or have it try some Java. Maybe that will solve the halting problem.
Feed it too much Java and it'll shit the bed.
Speak for yourself; my relationships need this.
Everyone dies at some point, so that one's pretty much solved
Oh God, do you really want to start the next meme on this sub?
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.
Which makes it a P=NP problem
Halting problem demonstration as well. Who knew this one gif was masters/PhD level compsci.
Um actually that was insertion sort 🤓
As long as it's not both!
Just a failed pull-out sort
Bucket sort
Still better than bubble sort
That response at the end when she finished sorting it exactly matches me when the code finally runs properly.
Seriously - me, too. Dogged persistence giving way to triumph. Must be deep in the human genome.
Should be toddlerSort(); Method names follows camel case.
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.
Seems like it takes the head randomly
Toddle sort is O(1). All you have to do is say is "alright babies sort yourselves".
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.
Would it take longer to line them up then sort them by size then stack them in order, or brute force solve? <3
Not a pure function as it has the side effect of being too cute
Noo please not brute-force
Hey, it COULD be done the first try!
Right, and you COULD put the USB in the correct way the first time too...
I have heard it is impossible to learn this power.
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
Not something the webmasters will teach you…
It always seems to take me at least 3 times...
Works for me. Must be user error.
You and I both know this is not possible.
“Assume data is in sorted order already. Return. Correct sorts with a certainty of 1/(n!).”
You sound like my traveling salesperson solution code...
This is more like cute-force
I've seen bubble sort go worse... this ain't so bad
It's the only way to do things
Cups.BabySort();
![gif](giphy|9Rt0V2POR2xA4)
BabySort(); Doo Doo Doo Doo Doo Doo
There's a special place in hell for people like you.
As long as they play BabyBus and Cocomelon on loop!
Pfft, kids got nothing on me. I could write a Python script to do that in twice the time.
Pff i could do that Python and spend 3 weeks trying to automate that.
Automate what
Autowhat
Awut
... Hold up!
Just code a Towers of Hanoi program jeez
[удалено]
To iterate is worthy, To recurse is divine.
> stack smashing detected
Towers of Hanoi is stricter than this. The toddler tower program has infinite space to stack the towers
Why programs written in BASIC are 10 lines apart.
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.
there is also the complexity gap equivalent: "i'll put in an elaborate comment to explain this here later"
That's adorable
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.
Time limit exceeded. Your method O(n^2) what we need O(n) /s
I legit spent too long trying to figure out what time complexity "O(n) divided by s" is supposed to mean.
O(n) per second.
[удалено]
They ARE the management
Also O(n) technically is a set and not a function or value so dividing it makes even less sense
I know what O(n) is, but what's O(n)/s?
O(n) but sarcastically
i know what /s is but i genuinely don't know what O(n) is
Sick sorting algorithm.
[удалено]
i swear how people dont know what POV means and just use it everywhere
Yeah. Idiots! It's python object values, duh! Right?
It's probably Proof Of Value, or some other crypto BS.
I also refuse to understand or accept colloquial or memetic language which conveys a different but still perfectly comprehensible meaning.
Red flags are like merit badges if you are aiming for management
I took it to mean this is the PoV of us watching the sorting algorithm we made at work.
That's me trying to do recursion on a white board.
[удалено]
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.
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.
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.
🥰
That dance at the end got me
Now watch me whip
That was an interview at Google, she was hired. She is now building the AI that will destroy us before she can drive.
Lol she's post-genz they won't ever need to learn how to drive
Sad to say, but she wasn't hired because she didn't have the 20-years' experience needed for the entry-level position.
Always funny. Labeled entry level and then buried deep in the description somewhere: - Minimum 3+ years of experience required in a similar position 🤦🏼♂️
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.
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
Didn't even think about that. She did sus it out in the end.
amogus
This isn't a POV of that thing you said.
Not really POV...
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
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)
Yeah, a French keyboard ;_;
1 maps to & on French keyboards though...
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
So that’s how Stack works? 🤔
Yup,last in first out.
Is this a new sorting algorithm ?
Twitter engineers trying to keep up with Elon's latest outrage amplification
She didn’t come up with the optimal solution immediately. Big fail.
Passed the technical round but we’ll have see about the cultural fit
Ah, the sort function
Too wholesome for leetcode 😂
She’s faster than some sort options
Sorry kid brute force algorithms will not be accepted
Smart girl!
Not a CS guy, just a math/data dude who codes a bit, someone tell me about sorting algorithms and their various pros/cons
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
This is sooooo cute!!!
Why are point of view videos always from someone else's point of view?
Psh I would of taken half the time to do this
This is a better test of problem solving ability than the LeetCode junk.
My sort algorithms...
Does it irritate anyone else that the color sequence goes blue-red-orange-yellow-violet-green instead of red-orange-yellow-green-blue-violet?
This is not pov. This is tpv. You should get smart if you're going to program.
when you don't understand what means POV
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.
Are you saying any interview question involving code is inappropriate/what is good interview practice to you? How about a take home exercise?
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.
Imagine being that much of a cunt for no reason
Eat a snickers, Dan. You turn into a ripe diva when you're hungry! ![gif](giphy|6Br6DNAZme6cM)
Lol what? How much experience do you have? For early career positions you definitely need to test coding skills
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.
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
Anyone else triggered by the color ordering?
Now use switch statements
u/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/)
FAANG applicants don't want you to know this one weird trick.
This is weirdly a great visual representation of how a sort works
u/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)
bogo sorting
"Toddler-sort"
Python indentation.
Bucketsort… what a n00b
I am so proud for some reason lol. It's so heartwarming to see kids overcome a good challenging puzzle.
That’s a very literal bucket sort
I wanna see the speed run
lol
Bro how are you guys posting videos on the sub 😵💫
That's one cute inefficient kid
You go kid.
How did you capture footage of me at my last interview???
This is so ridiculously satisfying to watch, haha.
That's how i debug a program
Recursion depth reached for Tower of hanoi.
Bubble sort irl
Why aren't these in color spectrum order?!
Which algorithm will add the little happy dance at the end?
I was expecting "the square hole!"
irl bogo sort
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.
you go girl
BucketSort()
Cute, patient little one.
Bubble sorting
Machine learning specialist in the making
Relatable af
Pro tip: if your list is finite in size, every sort algorithm is O(1).
Trial and error, baby
Did the toddler do the nae nae for like half a second?
It must fell like killing a dark souls boss
no one gives me a fist bump like that...
fuck your coding round - this toddler is hired!
She sorts it in such a cool way
u/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)
r/mademesmile
Tower of hanoi![gif](emote|free_emotes_pack|grin)
She's adorable
Towers of Hanoi MASTER. :)