Yeah, is almost acceptable. It doesn't handle equal values (but I guess the expectation is that usernames are unique), and typescript has a sort, so you could just do:
Screems the developer had no idea what they were doing and so will you after reading their code. (Based of the comment, didn’t bother trying to digest the code)
This code first sorts the participants into the participantsSortedArray and then the sorted "participants" are strapped to train tracks so we don't run out of trolley problems.
47
u/[deleted] Jan 23 '23
Runs
35
u/[deleted] Jan 24 '23
not take down production on a friday afternoon
20
u/GaeemzGuy Jan 23 '23
Earns a participating trophy
13
u/[deleted] Jan 23 '23
Works
18
u/oj_mudbone Jan 23 '23
Sorts an array of size 2. Not really that bad tbh
8
u/trutheality Jan 24 '23
It draws a progress bar.
8
u/Rogoreg Jan 24 '23
Throws mayonnaise at mach 7 at a random school
4
u/Rilakkuma_A Jan 23 '23
Sort my bedroom
7
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jan 23 '23
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
7
u/AccurateRemote2046 Jan 23 '23
Hacks Russia
2
u/[deleted] Jan 24 '23
This is the code used for ChatGPT.
1
u/TheCeo0fRacism Jan 24 '23
Prints an array
1
u/popdemtech Jan 24 '23
Finds my family
1
u/NetherDork Jan 24 '23
Screems the developer had no idea what they were doing and so will you after reading their code. (Based of the comment, didn’t bother trying to digest the code)
1
u/RDXKATANA99 Jan 24 '23
it will run as expected
1
u/timzik7 Jan 24 '23
homework
1
u/_Unity- Jan 24 '23
This code first sorts the participants into the participantsSortedArray and then the sorted "participants" are strapped to train tracks so we don't run out of trolley problems.
1
u/coloredgreyscale Jan 24 '23 edited Jan 24 '23
Lossless sorting of the participants by the region(locale) of their username.
1
u/NickSicilianu Jan 24 '23
hacks the FBI
You're going to get a job there soon 🤣😎
1
u/Sanduhr32 Jan 24 '23
I guess it calculates the square root of a complex polynomial of pi'th grade.
1
u/z0m3iee Jan 24 '23
Pays the bills?
1
u/MineKemot Jan 24 '23
Confuses everyone.
1
u/soem3 Jan 25 '23
makes a fart noise
1
u/nerokae1001 Jan 28 '23
sorting fast and flawlessly without losing any data.