I hate that my brain made me sort out what this does…
Funny how all (or most) comments are about the formatting and not the horrific implementation of permute. I can't even figure out if it works.
This is why its so good at permuting
It's the permuta triangle algorithm
Depression is iteratively calling a recursive algorithm inside of itself.
It does nothing, as that class only has two methods and both are private. (The closing brace for the class is at the end of the last line.)
Whatever its permute
method would do, if anyone were allowed to call it, it would have a time and console output complexity of O((n+1)!) (factorial time), unless n > a.length - 1
, in which case it'll throw an ArrayIndexOutOfBoundsException
.
Edit: Off by one in the time complexity.
I was like “what friggin language is this” until I saw the horrifying brackets 🤢
Jathon? Pyva?
is this the "Jason" every web developer seems to be so obsessed over?
Jython probably, since there's the cython
I was like “is this python…? I’m so confused” and then saw the brackets and physically startled lol
IRL depression doesn't really look like anything, though
True. I should post a selfie.
I was so confused until I finally looked in the right margin.
Kill it. Kill it with fire.
This isn't depression. This is heresy.
Brother, get the flamer... the heavy flamer.
This is autism
Variable width font coders BTFO
I- really can't tell if I love or hate this
Aside from the obvious, why are the methods static and not extension methods? Or just injected as a singleton?
Everything in JVM-based languages needs to be encased within a class, even if you just need to define a collection of pure functions. Kotlin allows you to create "classless" files in which you define these pure functions, but that's ultimately syntactic sugar.
No, I think that's the manic stage.
So nobody remembers c++?
The RHS is killing me bro 😶
We write code in a readable form for humans not machines.
Anything other than 1TBS is mental illness, change my mind.
LOL the code segment is the most accurate depiction of how my brain feels on a daily basis 😂 #ProgrammerLife
Hi police? I'd like to report an assault.
ON MY EYES
This isn't depression, it's a cry for help.
Yep, that make my readability drop to -1
It’s not even good code
Lmao, both are accurate, but that Java code hits a bit too close to home! Anyone else debugging till 3 AM feeling like a part of their soul is being permuted? 😅
Ugh reminds me of the time I accidentally took the harder coding class that was required. One of the worst classes ever (teacher sucked)
When a python dev tries have for the first time :D
Most of my programming experience is python, so I never understood what is wrong until comment section. My only guess was "Java surely must have built-in function for that, like itertools.permutations in python. Maybe it's the joke, that depressed person rewrites library functions"
I had my C++ segfault in the inplementation of GTest on a random ass move. We debugged it for 3 days, than we came to the conclusion, that my linux distro is fucked, and the problem isn't in the code.
java code that looks like python yeah, nice
Must add this comment:
// Do not reformat the braces {}. It breaks the production.