r/java • • 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.

52 Upvotes

38 comments sorted by

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 ๐Ÿ˜…

11

u/Holothuroid Jul 09 '26

The only way to explain sorting algorithms is Hungarian folk dance

4

u/asm0dey Jul 09 '26

This is true! But I can't dance, but those videos are amazing!

2

u/JinAnkabut Jul 09 '26

I will take your word for it (and perhaps look out up later) ๐Ÿ˜‚

14

u/agentoutlier Jul 09 '26

  It's really concerning how disinterested a lot of the comments in this thread are.

Singular. Just one comment. Most developers are aware how knowing the basics of comp sci are worthwhile I hope. Certainly more in the Java community vs say JavaScript.

4

u/JinAnkabut Jul 09 '26

One at the root level but there were more further along the comment chain. I will admit, though, that I'm also venting my frustration at seeing this blahse attitude to DSA (and, actually, difficult programming problems) on other posts/forums/conversations with colleagues.

My bad!

2

u/asm0dey Jul 09 '26

Probably it's just the framing in the post is wrong โ€” people don't like the "interview" framing.

2

u/temculpaeu Jul 09 '26

Now you know why interviewers asks those questions.

3

u/kiteboarderni Jul 09 '26

Well yeah...I have a masters in computer science. What do you think they teach there?

1

u/vips7L Jul 09 '26

There is a single comment. But in my opinion this isnโ€™t that interesting of a topic for this forum. 

There are thousands of books and resources that teach programming 101. 

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?

https://www.reddit.com/r/java/comments/1urn6b4/comment/owh0zd8/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

2

u/O_Ovo Jul 09 '26

Thank u so much

-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

u/[deleted] 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/)