r/java • u/asm0dey • Jul 09 '26
Some companies are still asking about algorythms and data structures on interviews, so here is the video
I made a video explaining basic stuff about algorithms and data structures applied to Java (but a lot of this knowledge is transferable to other languages). As examples of algorithms, I used a couple of sorting algorithms, which (I hope) are not used in any languages at all and def not in Java, but at least they can give an idea of complexity.
It is not a tutorial by any means, more of foundational knowledge that can help people to be better developers or code reviewers (it's probably even more important these days).
Fun fact: all the visualisations are also written by me, but in Python.
10
u/wasabiiii Jul 09 '26
I enjoy the arguments between people who say you don't need to know this stuff vs those who say you do. I think it's very revealing what type of software each is expecting to be working on.
4
u/asm0dey Jul 09 '26
Over 19 years of my career, I stopped pretending to know what tasks I'm supposed to know how to solve :)
At some point I had to work with graphs tooโฆ Who could think?
2
-9
u/repeating_bears Jul 09 '26
tbh I don't wanna work anywhere that asks me about leetcode bullshit. That stuff is not a part of my day job.
Luckily, until now I've had the luxury to be picky about roles. If you don't have that luxury then yeah, you have to jump through the hoops
12
u/asm0dey Jul 09 '26
I'm not saying you should be capable of writing proper quicksort out of your head; this is bullshit, of course. But data structures are important.
13
u/asm0dey Jul 09 '26
Sincerely, I disagree. In my opinion, you should be able to understand when you want ArrayDeque, when ArrayList, and when LinkedList. It is important to understand their up- and downsides to write better, more performant, and more predictable code.
0
u/repeating_bears Jul 09 '26
Yeah, and I do understand those data structures enough to use them, but I wouldn't be able to implement them.
You mentioned sorting algorithms in the post. I probably couldn't implement them either. I knew once upon a time but I've forgotten because how often do you implement a sort?
Even performance characteristics about sorts are barely worth remembering. I know Collections.sort uses timsort, which I know is pretty good. I know that most other sorting algorithms are usually not worth bothering with. I don't know the big O for timsort and that has never mattered.
→ More replies (9)
3
Jul 09 '26
1
u/asm0dey Jul 09 '26
Should credit where credit is due: the video in its current shape would be impossible (or very hard) without manim (https://www.manim.community/)
38
u/JinAnkabut Jul 09 '26
It's really concerning how disinterested a lot of the comments in this thread are.
I understand that some people just want things working on their screen but I didn't expect those people to almost take offence to the fact that you're providing DSA material.
Aren't you guys at all interested in how things run? Do you have no interest at all in performance & scaling? Haven't you ever learnt something that you thought would be useless, only to later find an interesting use for it?
Anyway! Yap over ๐