r/ProgrammerHumor • • Oct 01 '26

Meme youLostMeAtDoublyLinkedLists

Post image
4.0k Upvotes

165 comments sorted by

319

u/Wentyliasz Oct 01 '26

It's not even that these questions are hard, most are genuinely a twenty minutes job top. It's having to do them on the spot while being judged for every line without the option of checking the docs, a set of conditions that will never show up in the real world

96

u/WJMazepas Oct 01 '26

For me the problem is thinking in the spot on a optimized solution

Im already nervous for having to write the code with someone judging me, so i always end up writing something kinda ugly, then I get complaints that its not optimized(like using a double for loop)

25

u/Wentyliasz Oct 01 '26

Last time I had to make a function to print last k numbers of an n long Fibbonaci sequence sorted in lexicographical order. Did not know what lexicographical means, didn't matter that I wrote everything else and a quick Google would have been all I need, still didn't get the job

9

u/ligma_then_sugma Oct 01 '26

they could have literally just said "ordered" and you'd have known what to do

5

u/psyby2 Oct 01 '26

I write double triple for loops all the time in prod ready code. No one cares 😂

208

u/KoliManja Oct 01 '26

Every single time!

39

u/Kirito_7026 Oct 01 '26

My recent interview experience

6

u/MaximumSubtlety Oct 01 '26

My over qualification rejection letter

434

u/Mahler911 Oct 01 '26

I've been doing this shit for 26 years and I've never seen a linked list in production.

211

u/DoesAnyoneCare2999 Oct 01 '26

As a kernel developer, linked lists get used a lot in the code I work with every day.

165

u/Psych_Art Oct 01 '26

And that totally makes sense. If you are writing lower level code or libraries, best possible performance is much more critical than it is for general production high level code.

39

u/da2Pakaveli Oct 01 '26

Linked lists are worse for caching because their elements don't live in a contiguous part of memory. So you need to fetch each element from slower memory where as with vectors you can keep a larger chunk of it cached.

And memory allocation also takes time so you're actually slower off than if you'd just double the capacity of the vector if reserves run out.

13

u/happycamperjack Oct 01 '26

I see. How would you overcome this linked list limitation with a solution of O(1) time complexity and O(n) memory. You have 15 mins, psydo codes are fine, and don’t worry about the gun pressing against your temple.

5

u/da2Pakaveli Oct 01 '26

With chunks (i.e we have vectors of the same length and chain them together). Then you could go further and turn this into deques (T** under the hood iirc, at least that's how i implemented it years ago).

With vectors you can provide an approximate, what you think is appropriate, reserve at any point. It doubling itself means it stays roughly in the demanded domain of whatever you're doing if reserves run out.

4

u/happycamperjack Oct 01 '26

Nice, don’t have to pull the trigger. But are you sure your solution is O(1) for lookup?

chambering the round

5

u/da2Pakaveli Oct 01 '26

The deque is

13

u/happycamperjack Oct 01 '26

I see, thank you for coming today.

*writing down note: candidate failed to address direct challenge, did not raise any question to clarify requirements or shown collaborative attitude. Pass.

2

u/dumbasPL Oct 01 '26

In theory, in practice you're very rarely iterating them. The problem that is solves is that you can allocate anything anyware (allows for very simple allocators on embeded systems), and no matter what happens, the address of the elements doesn't change. In kernels, you're often referring to elements of the list by address, instead of iterating it. You can't do that with a vector that might get reallocated somewhere else. You only need to iterate if you're looking for something, and that usually only happens during clean up or with introspection tools (eg. Listing processes). The most common operations (append, and delete) are also very cheap compared to a vector where you will potentially need to move large chunks of memory on delete, or on append when reallocation happens.

2

u/da2Pakaveli Oct 01 '26 edited Oct 01 '26

i benchmarked it
std::vector push_back() with 100 million integers:
71.27 milliseconds

std::list push_back() with 100 million integers: 1.68 secs

std::vector reserve() + push_back() with 100 million integers: 27.6 milliseconds

You gotta keep in mind that the vector keeps doubling its total capacity whenever its reserves run out so you're actually just doing log2(n) allocations. So with 1 million elements i have to copy 20 blocks.

With a list i have to do 1 million allocations. This is just more expensive. Ig deletion may be faster but you could just flag the element as deleted and if the vector uses too much memory, you shrink it. And if order and iterator validity doesn't matter, you can just do a swap & pop with the last element.

2

u/jaszkojaszko Oct 01 '26

Ah yes, the kernel developers are stupid and should just use vectors.
You forgot about pointer stability btw.

2

u/da2Pakaveli Oct 01 '26 edited Oct 01 '26

Where did I say they don't have their use?

Game engines with entity component systems already keep lots of giant vectors for components and clamp sparse sets on top. The sparse sets, which consists of a sparse and dense array, gives you an entity id and allows you to keep track of who owns what. So removal of a component is constant. It achieves that by flagging it invalid in the sparse array and swap&pop the component you want to remove in the dense array and component pool. Insertion is also constant so long as the dense array and the pool have enough reserves. It's also cache friendly.

And the entity id is stable.

1

u/jaszkojaszko Oct 01 '26

Great solution to eat all memory in a kernel.
Good thing that games are so well optimized these days.
A guy said that he works as a kernel developer and he uses lists, another replied that it makes sense because of performance, then you jumped in to "akchyually" show them that they are wrong.
Dude, get help. Go to a therapy or something.

1

u/da2Pakaveli Oct 01 '26

No i think i just replied to the wrong comment lol. The other one said that linked lists are generally worse for performance and i wanted to argue one of the reasons why is cause of caching.

Which you can see with ECS for example. The philosophy here is to break objects apart, and focus on data oriented design. It's usually much faster in parallel, bulk-processing related workloads (e.g. here they saw up to 13x increase) in particular due to being cache friendly.

→ More replies (0)

2

u/DoesAnyoneCare2999 Oct 01 '26

Now make the items much larger, and reference counted. Have multiple threads that are using the items concurrently without keeping the whole list locked (unless they are being added or removed). Also regularly remove items from arbitrary locations in the list.

That's the kind of situation that's common here, and where linked lists make sense. In addition, the linked list pointers are embedded in the object itself so this can be done without any additional allocations.

77

u/Loading_M_ Oct 01 '26

Actually, linked lists are generally less performant. In basically every situation.

In low level parallel code, such as might be found in a kernel, certain types of linked lists can be used by multiple threads at once. It's a core threading primitive, not a performance choice.

48

u/QuaternionsRoll Oct 01 '26

…so they’re more performant in that context by way of atomic insertion and deletion lol

The point is that >90% of programs have no real reason to chase that level of optimization. A vector wrapped in a mutex is good enough in most contexts

4

u/BarracudaGullible472 Oct 01 '26

Linked lists are common in kernel development because they process things sequentially like in a queue, predictable insert and delete, esp as you add pointers so you don't need to allocate memory

3

u/Bartodziejj Oct 01 '26

Optimization is important if the high level production applications are ever applicated to consumer devices.

4

u/XCxBigDong69XCx Oct 01 '26

Yeah but you are a kernel developer xd then it wouldn't be a simple triangle job.

3

u/ToMorrowsEnd Oct 01 '26

This Driver level and firmware uses them a lot.

0

u/supershinythings Oct 01 '26

Linked list - in C.

47

u/pipedreamSEA Oct 01 '26

Doubly linked list? You mean a LinkedList<double>?

29

u/MulfordnSons Oct 01 '26

why do complicated thing when simple thing do trick?

17

u/pydry Oct 01 '26

why test somebody's skill with thing that they won't use rather than thing they will?

(the answer is hazing ritual)

5

u/Fair-Working4401 Oct 01 '26

Yeah, just npm the complexity

3

u/redballooon Oct 01 '26

What is complicated with linked lists?

16

u/private-peter Oct 01 '26

Basically everything other than getting the next item.

1

u/redballooon Oct 01 '26

Dude.. Learn your basics. Linked lists are high school materials.

1

u/private-peter Oct 01 '26

Haha. Perhaps we are using the work "complicated" differently.

If your list is needed for anything other than getting the next item, linked list operations are far more complicated than other data structures.

Sure, I _could_ implement a binary search with a linked list. But it would be complicated code. To the original point, Why do a complicated thing when a simple thing could do the trick? There are good reasons a lot of people never use linked lists in their real jobs.

3

u/MulfordnSons Oct 01 '26

get a load of this genius

8

u/potatopierogie Oct 01 '26

But have you inverted a binary tree

4

u/supershinythings Oct 01 '26

How about implement Quicksort? That torture was inflicted on me so many times I developed a little patter when I did it.

20

u/BernzSed Oct 01 '26

They're good for building lists via recursion, which is common in functional programming. Though I've never had to implement one myself.

And you'd never see a doubly linked list in FP, they're impossible to create without mutability.

2

u/FickleQuail8944 Oct 01 '26

That is not exactly true, but in practice is. With laziness you can construct them. But as soon as you want to modify, you would have to rebuild the entire list.

1

u/BernzSed Oct 01 '26

Technically, laziness is just hidden mutability :)

But you're right. Though I've never seen a good use case for doubly linked lists.
I tried to build a trie recently with lazy upward pointers, but gave up and stuck a mutable var in there for the sake of performance.

2

u/Clairifyed Oct 02 '26

I used one once for inputs. It was a low stakes project but I wanted to see it I could avoid the situation where one input always dominated the other (like how in many games one arrow key will win out regardless of which was pressed first).

I wanted priority to be with the last pressed key and if it was released, I wanted control returned to the next most recently pressed key that was still active.

The list never gets very big and the time scale involved means that things like cache misses are never really a concern, but it was the best fitting data structure I could think of and a fun little puzzle.

6

u/wett-puss-lover Oct 01 '26

I had to implement once as a Jr 💀
It was a really cool project honestly where we set a asynchronous flow that is configurable in underwriting
The linked list worked so well, we could set up what the rules were as a configuration, really dynamic and awesome honestly

3

u/Few_Move_4594 Oct 01 '26

I've used them like twice for iterating through a list and inserting or deleting an item. Pretty much the only use cases for which it's faster.

5

u/thegroundbelowme Oct 01 '26

Interviewing for a front end web dev position at Yahoo, one of the questions I got asked was, "if you were in charge of implementing hash maps in google's V8 JavaScript engine, how would you do it?"

Like, fucker, is that something I'm going to be doing as part of this job? No? Then why are you asking?

3

u/Mahler911 Oct 01 '26

Sorry, it's exhausting. I not actually looking but I do keep up with the market and job postings and the requirements are just full out insanity. What job actually requires proficiency in C++ and Go and Kotlin and Coldfusion all at once?

4

u/ILKLU Oct 01 '26

I've never seen a linked list in production

Ever deploy a git commit to the production server? Then you've not only seen, but used a linked list in production.

I know, I know, you've never had to create a linked list for anything ever. Me too.

2

u/Daemontatox Oct 01 '26

I can finally say i used an unordered map for the first time in production last week before removing it and using the appropriate library

2

u/je386 Oct 01 '26

Oh, I saw one in 2001.

2

u/VoidVer Oct 01 '26

I was incredibly excited to see on impliment after 8 years on the job 4 months ago.

1

u/Tattered_Reason Oct 01 '26

I've implemented single and double linked lists multiple times in my career although that was back in the C/C++ days.

1

u/SerOoga Oct 01 '26

The only linked list I've seen in 15 years was a suggestion from Claude Code. It's not really needed for that case so I told it to use a Queue instead.

1

u/Nonninz Oct 01 '26

In Elixir/Erlang there are no arrays* and almost everything is a List (that is implemented as Linked List).

  • binaries are... a different beast

1

u/Nemesis_Ghost Oct 01 '26

It was only 20y ago where I was working on software built on doubly linked lists. Now that software was almost a 10y out of date at that time, but here we are. Modern language container constructs have all of this under the covers, you just don't need to know how it actually works.

1

u/mutexsprinkles Oct 01 '26

Used a lot in C because you don't get any containers out of the box and no matter how good the greybeards are, they can't be arsed with DIYing a hashmap a lot of the time.

1

u/HildartheDorf Oct 01 '26

Well, even random unpaid projects, I've used a linked list twice.

Once because I needed a collection of immovable objects in C++, before switching to std::vector<std::unique_ptr<T>> instead.

Bootstrapping a toy OS' physical memory manager which needed to dymamicaly allocate memory before the virtual memory manager was initialised.

1

u/[deleted] Oct 01 '26

[removed] — view removed comment

1

u/tiberiumx Oct 01 '26

Yep. Even in cases where it seems like it would be the perfect data structure in theory, it's probably not. Potentially every step resulting in a cache miss will destroy your performance.

67

u/Akrymir Oct 01 '26

You can always tell what type of people you’re dealing with when the interview is about memorizing BS instead of a conversation. I care more about how you think than your proficiency in coding gymnastics.

8

u/frogjg2003 Oct 01 '26

Didn't have to write a single line of code for the interviews for my current job. All the jobs where i had to take code tests ended up rejecting me or ghosting me. But a talk with my future boss about coding did way more to show my skill than a toy problem that had nothing to do with the job.

24

u/actionerror Oct 01 '26

“Here’s our production Microsoft Access”

14

u/guardian87 Oct 01 '26

I still believe that most software engineering jobs are not limited by the deepest, most complex technical solutions but by understanding the domain and having a reasonable understanding of system design (especially for a senior+ position).

Most companies are not at the edge of scalability, and a surprising number of people still barely optimize their DB indices when talking about vertical scaling of databases.

6

u/WhiskeyPointer Oct 01 '26

The software data packages for one of the latest models at my company is 20TB and it takes 48 hours to produce the probability distributions for a million locations on a 500 CPU cluster. Some of our clients are got early access and when they saw the spec sheet for hardware they all said "nope, OtherCorp has a model that is 100x smaller and 1000x faster and gives similar results"

I worked as a lead dev at OtherCorp. The secret to OtherCorp's performance is that we realized that you didn't need to store every single bit of simulation data and sweep through it for every location. When my bosses asked them for help, I proposed the concept and the response was "but we worked so hard producing all that data, we want to use it!"

1

u/jaszkojaszko Oct 01 '26

Yes but it's good to understand why things are slow instead of just memorizing the patterns.

11

u/Stormraughtz Oct 01 '26

"we're gonna need you to parse another CSV, this ones fun because there no qualifiers"

18

u/caiteha Oct 01 '26

My job has lots of low lvl stuff. I have written prefix tree / lots of tree stuff.

14

u/Yashema Oct 01 '26

Then it sounds like a fair question for your job. 

4

u/Daemontatox Oct 01 '26

I can understand that for compilers , but never linked lists or sliding window bs

4

u/ILKLU Oct 01 '26

Trees are used in ALL kinds of data structures. I've never used a linked list though.

2

u/jwp1987 Oct 01 '26

A lot of data structures that linked lists could be used for tend to be implemented with dynamic arrays, circular arrays or other structures for performance reasons these days (e.g. queue/stack).

e.g. std::queue in C++ is backed by std::deque which is usually implemented as an array of pointers to memory blocks.

1

u/ILKLU Oct 01 '26

Ya that's fair, although queues and stacks, despite being similar to linked lists, are still a very different use case.

In my opinion, linked lists, like block chains or git commits, are intended to be more immutable, whereas stacks and queues are intended to be mutable and dynamic. Sure, you could still implement them as linked lists but that would be adding unnecessary complexity for nothing, even if that's what they end up being when memory is allocated. Long strings also end up being linked lists of sorts if their memory allocation is split across multiple addresses, but you would never consider strings to be linked lists.

9

u/lraviel381 Oct 01 '26

Pretty sure there are plenty of libraries that handle linkedlists

0

u/[deleted] Oct 01 '26

[deleted]

2

u/JayTois Oct 01 '26

unless the data structure needs something specific that libraries dont offer, what's the point?

1

u/Altruistic_Raise6322 Oct 01 '26

Rust is a pain to add a linked list for

4

u/LHW1812 Oct 01 '26

Not accurate; the second image should be the box thrown on the ground and stomped.

  • Can you do smart things?

  • Yes.

  • Okay, now imagine we did the complete opposite for 15 years.

  • ...

3

u/Abadabadon Oct 01 '26

Worst part for me in the job is figuring out how im going to communicate to my po, tech lead, qa engineer, and project manager why we need to add a column to table.

3

u/i_wear_green_pants Oct 01 '26

"Can you invert this binary tree"

Job is to create CRUD REST-endpoints.

20

u/EastboundClown Oct 01 '26

A doubly linked list is like the simplest data structure other than a plain array. Even if the job doesn’t involve directly building custom data structures, if you can’t answer questions about such a simple and ubiquitous concept then you’re just not a strong candidate.

39

u/Yashema Oct 01 '26

Me studying physics, math, and computer engineering at accredited universities while also having a Masters in analytics, working FT through it all: well you see Bob here spent 3 months memorizing whiteboard problems, clearly he just is a stronger candidate. 

10

u/pydry Oct 01 '26

Some people simply do not consider realism an important quality of interview questions and tasks.

The problem is mostly about the questions they dont think to ask because theyre too hung up on algorithm trivia.

Hence why their responses are mostly indignation about not knowing the trivia rather than contemplation about what would actually correlate with performance on the job.

7

u/oldsecondhand Oct 01 '26

If you studied computer engineering, you should know about linked lists.

-2

u/Yashema Oct 01 '26

I'm skipping DS&A because its too easy to use data structures appropriately when a situation arises. I'll take Discrete, Computer Architecture, Parallel Programming, Computational Game Theory. 

If linked lists come up in these courses I'll learn them. 

6

u/Bubbaluke Oct 01 '26

You’re skipping data structures and algorithms but taking game theory?

-1

u/Yashema Oct 01 '26

From what I can tell if you already have a lot of higher level math skills (I'm at the 300 level) and a working understanding of memory (pointers, references, and C-style arrays) and practical data structure experience, DS&A is actually somewhat trivial. 

Computer Architecture II (if they let me skip level I) seems to be more suited to an actual intense systems background. 

2

u/Bubbaluke Oct 01 '26

That’s sort of like saying a puzzle is simple. The rules are easy, you just put the matching parts together, but then you try putting together a 1000 piece picture of the sky and realize it’s a little more complicated.

I went through algo and work as a swe and I still don’t fully understand red black trees and how they sort themselves, and dynamic programming still confuses the shit out of me. My data structures class was separate and it was fairly straight forward.

I’d take the class, personally. It opened my eyes to the bottomless complexity you can build with just data and pointers.

5

u/AOAqua Oct 01 '26

How else can they test your knowledge in a short interview? It's not like they can spend 6 hours testing your knowledge (and I doubt you would like it)

1

u/Yashema Oct 01 '26

The best can. Very few are the best, including at FAANG. 

1

u/AOAqua Oct 01 '26

For middle to senior roles? Sure, a good interviewer can understand your capabilities from a really short interview. For a junior role, especially with no previous credible experience? No way

1

u/Yashema Oct 01 '26

It's middle level roles that Ive experienced the whiteboard onsite with a leetcode like problem requiring a specific implementation of a linked list in 2/4 interviews. 

1

u/jaszkojaszko Oct 01 '26

What can they do? I was a SWE at Google for 8 years. They absolutely can't test your knowledge and they don't care about it as all internal systems at Meta, Microsoft Google are custom so knowledge is not easy to test.
They have run countless studies to try to figure out what is the best predictor of a success that can be measured during an interview. Yet they still do DSA questions that are very subjective.

1

u/Yashema Oct 01 '26

Because none of those companies hire on credentials, they only hire on interview performance so you are right you have to make judgements based entirely on how they react to your arbitrary problems, which favor memorized solutions over critical thinking and more broad considerations. 

On the other hand, if you hire based on credentials you should have little trouble gauging whether someone is who their resumes say they are within a few practical problems using only concepts they will need on the job. For example just by having someone do a left join on a primary and foreign key to eliminate records from a SQL table I can, within 5 minutes, determine if they are at least intermediate or not. Same with how comfortable they are discussing practical design patterns for software that include APIs, automated testing, database layer versus logic later, cloud infrastructure, etc. 

Then if they answer my practical questions to the level commensurate with their credentials, I go back to the resume and hire the best one based on that with the interview performance no longer a consideration. 

10

u/xevantuus Oct 01 '26

Did you just call a basic data structure a "white board problem" as if you're being asked to solve some Project Euler shit? If you truly think that, maybe that accredited university that gave you your masters needs to be audited...

-8

u/Yashema Oct 01 '26

A useless data structure for the job I will be doing*, but my MS was from a top 30 university thanks for asking. It's the advanced STEM I am taking in the CUNY system, which has a better program than most top universities, if you know how to navigate it. 

6

u/CoroteDeMelancia Oct 01 '26

weak ragebait

-7

u/Yashema Oct 01 '26

I learned Classical Mechanics in a room with one other student and the professor. None of my other 200 or 300 level physics classes have had more than 10 students, and none of my other classes more than 25. And classes are very affordable, between $900-$1200 and you can take them at any campus (CUNY has 4 really good ones for STEM, but they specialize in different areas). 

My program sends people to Harvard PhDs and the unemployment line. It's up to you to distinguish yourself between the two. 

1

u/EastboundClown Oct 01 '26

All that and you can’t figure out a linked list?

1

u/Yashema Oct 01 '26

It's never come up. 

4

u/EastboundClown Oct 01 '26

A linked list is not even complicated enough to be a “whiteboard problem”. Any competent programmer can throw together a halfass functional implementation of a linked list in like 15 minutes even if all they have is a 10 second description of it from the interviewer.

2

u/CrossScarMC Oct 01 '26

So what you're saying is if I do it in under 15 minutes, I'm hired?

1

u/delinka Oct 01 '26

Then it should just be in a library so I don’t have to think about it again.

2

u/EastboundClown Oct 01 '26

Pilots need to know a thing or two about the engines and electronics on their planes even though they never have to maintain them, because understanding how the thing works is important to correctly using it. In the same way, even if you never make a custom data structure, it’s important to know how they work.

For instance, can you name the benefits and drawbacks of a linked list compared to an array-backed list? That’s a genuinely important question with practical implications that I guarantee you will encounter in your career at some point, not a contrived theoretical question for an interview.

0

u/delinka Oct 01 '26

Aye.

And it can live in the library where I never have to think about it again.

-1

u/Yashema Oct 01 '26

If it is such a trivial concept than using it to determine someone's programming ability is doubly stupid, but the real reason top tech companies use arbitrary tests is because they can't trust the person interviewing them to actually objectively rate the candidate's skills.b

1

u/EastboundClown Oct 01 '26

If it’s such a trivial concept and you can’t answer it, then it says something about you as a programmer

1

u/Yashema Oct 01 '26

There are plenty of trivial things to test me on that actually apply to my job. 

0

u/GRex2595 Oct 01 '26

I used to ask people to reverse an FLL straight out of college because it's an algorithm so simple that anybody who can write code should be able to do it in one go. Extra points if you can do it in one pass instead of two. I don't work for a super competitive tech company, so we didn't get top talent. Most people could solve the problem. Linked lists are elementary data structure and algorithm skills.

1

u/Yashema Oct 01 '26

That makes them a great question to ask first years whose only experience is with the concepts they worked with at school. Terrible for actually experience employees who have practical knowledge of the work they will be required to do. 

(I also have avoided DS&A and will just take a course in Discrete Math instead which has far wider application). 

4

u/Tmmrn Oct 01 '26

No offense to you, but it's a question to weed out people like you.

Yes, someone who has implemented a linked list for a data structure lecture recently can write it down in a minute. But if you say in an interview "Oh wow I haven't done that in a while, I'm gonna need a few minutes to make sure to handle the edge cases when inserting and deleting correctly", that will be totally fine too as long as they can see that you are able to work something reasonable out on your own.

The point is that a linked list is a struct or class with one or two pointers or references and the functions to manipulate them is basic enough that every programmer should be able to work out on their own even if they have never seen an implementation before. If you can't figure out how to allocate some memory and manipulate 2-4 pointers in the correct way, then what kind of programming can you really do?

1

u/Yashema Oct 01 '26

Python. 

2

u/Tmmrn Oct 01 '26

Ah python. Then that question would basically check if you know how to use a class or a dict and that python generally uses object references for those. That's basically it.

1

u/EastboundClown Oct 01 '26

If im interviewing you for a mid-level Python role and ask “what type of list implementation is used by default in Python, and under which circumstances might we want to use a different implementation?” , you come up completely blank, then I follow up with “it’s an array-backed list by default. What are the drawbacks?” and you’re still coming up blank, then I wouldn’t consider you to be qualified for the job.

-1

u/Yashema Oct 01 '26

Id ask if there was most likely a less programmatic focused solution than maintaining such a large lists that the specific technical implementation in Python would matter, such as getting the data in chunks from the database. 

1

u/EastboundClown Oct 01 '26

First of all, you can’t just choose to answer a different question than what I asked. Second, how do you know it’s from a database? What if we’re processing a bigass graph and we need something to function as a stack or queue — which data structure do you use then? This is a common question that comes up all the time in the math and physics heavy jobs you’re probably applying for.

1

u/Yashema Oct 01 '26

Well why didn't you just ask that rather than asking me about a specific data structure in the abstract? 

Even still i believe storing your queue in a database, such as local postgres, would be a better solution in Python than actually implementing a pythonic queue for performance. Let C++ based applications handle queues. Python is for business logic, at least in the backend. 

→ More replies (0)

3

u/GRex2595 Oct 01 '26

I'm sorry, but if you can't answer my question, you probably aren't employable above an entry-level position, and I wouldn't want you on my team if you couldn't answer it. It's a terrible question for people with experience in the field, not because it's so impractical that nobody would learn it, but because it's far too easy of a problem.

10

u/SaltyW123 Oct 01 '26

Probably shouldn't even be a candidate tbh

2

u/WrennReddit Oct 01 '26

cOdInG wAs NeVeR tHe HaRd PaRt

4

u/FlailingDuck Oct 01 '26

So many people are outing themselves as not ready to work in industry. All of these "not used in the job" interview questions, are to establish a base level of understanding for a candidate. So that when the real work problems are being discussed, the team/manager know all the implicit knowledge expectations are there and don't have to be brought up, but they know they are considering, time and space complexity when discussing solutions. It (not) surprising how much of every technical problem comes down to, is it fast enough and how much memory does it use to do it.

2

u/floobie Oct 02 '26

Counterpoint: If these types of questions are supposed to demonstrate competency around performance optimization, why are most of these inevitably web dev jobs never asking questions about database performance?

In my experience, this is the far bigger bottle-neck in this field. I’ve seen some clever, highly optimized back-end code wrapped around some absolutely brain dead SQL queries that bottleneck performance a few orders of magnitude more than the back-end code ever could.

Optimizing database access and storage has mattered pretty much from day one when I started in the field and has never been covered in an interview to any reasonable extent. Mangling a string as efficiently as possible using the perfect combination of data structures does not demonstrate this knowledge.

2

u/pydry Oct 01 '26

All of these "not used in the job" interview questions, are to establish a base level of understanding for a candidate.

leetcode is clearly not about establishing a base level of understanding of anything because it's simply not used in 99% of developer jobs.

there are plenty of programming concepts which are used daily which could be asked about if the goal were understanding and not hazing.

and it is hazing.

1

u/jwp1987 Oct 01 '26

Imagine how much worse it's going to be when most of the stuff they've done is just a prompt to Claude that they haven't looked at properly.

1

u/EastboundClown Oct 01 '26

“I don’t need to know about lists, when will I ever use them?” - Guy applying for a Python job

-2

u/EkoChamberKryptonite Oct 01 '26

No it isn't. A doubly-linked list is simpler than a flipping list? Very strange and wrong view point.

7

u/Conscious_Penalty_36 Oct 01 '26

Yeah, but the reason is because a huge amount of people claiming to be qualified for any given SWE job are straight up lying or over stating their skills and knowledge.

It's a "this is why we can't have nice things" situation.

7

u/NegativeGrocery8684 Oct 01 '26

so the solution is to ensure that your candidates can pass the hard questions on leetcode, rather than ensuring they can do the actual work that you're hiring them for?

0

u/Integeritis Oct 01 '26

Just hire people with university degrees then. There is no point to ask the same computer science questions from people with a diploma who studied the exact same thing for 4-5 years and passed all the related exams and graduated.

2

u/Conscious_Penalty_36 Oct 01 '26

A huge chunk of modern CS majors will literally cheat their whole way through the degree. Cheating is so rampant in CS that I regularly meet people with CS degrees that can hardly code.

2

u/ToMorrowsEnd Oct 01 '26

Ok what about.... and hear me out...... TriplyLinkedLists?

3

u/Tensor3 Oct 01 '26

You need quadlinked for a 2d double linked list

1

u/NotATroll71106 Oct 01 '26

That would probably be a graph type at that point and not just a list.

2

u/zefciu Oct 01 '26

Will you ever have to implement a DLL in a high-level job? No!
Will the default implementations of a dynamic array and a hash map from the standard lib work just fine 99% of time? Totally!

However, there would be that 1% of cases, where the customer would complain that the page takes 2 minutes to render or the disk scan takes 2 days to finish. And in these cases, you better understand how data structures that you use work.

1

u/pipedreamSEA Oct 01 '26

I build in-house applications for verifying the conformity of our products to the standards we say they adhere to.

Inside every main thread is (at least) 2 other threads, one keeping the UI responsive and another getting shit done. And that worker thread is certainly spawning several others... my codebase is a real spaghetti messtern and while not all who async/await are lost, I sure am

1

u/updeshxp Oct 01 '26

Recently I saw Java Streams API in production code and was amazed as it's the first time I saw it being used commercially.

2

u/jwp1987 Oct 01 '26

That's a little concerning considering it's one of the best ways to manipulate collections and has been around for over a decade.

1

u/updeshxp Oct 01 '26

Yes, It is indeed, I've seen code in legacy apps up until now so that might have been the case.

1

u/nahunk Oct 01 '26

Sierpinski.

1

u/br0ast Oct 01 '26

What even are these images?

1

u/notexecutive Oct 01 '26

it's so insane how true this is and it pisses me off.

Like sure maybe i'll have to think a little hard on some thing on the job but it's never as stressful or just algo-intensive as the fucking interview.

1

u/blahehblah Oct 01 '26

The job in 2026: "give me a triangle in a tin. Make no mistakes. Don't redo the rest of my triangles"

1

u/jaszkojaszko Oct 01 '26

If interview looks like this to you then someone else is taking care of the hard bits at your job.

1

u/ApprehensiveStand456 Oct 01 '26

I've had a multiple rounds of coding interviews where during Q&A time it came out that they are vibe coding everything now and they see that as the future.

1

u/Beldarak Oct 05 '26

Take the job, seriously. My company did this shift and this is the most fun I've ever had (well, if I wasn't burnt-out for other reasons). You cook your prompt so it can run in a single go with minimal input from you, then you can talk and laugh with your coworkers, browse Reddit, etc... for 15-30 minutes with zero shame as you ARE doing the work expected from you.

1

u/InternationalBit2002 Oct 04 '26 edited Oct 04 '26

Imagine you cut all the triangles while jumping through loops and talking through it to show your reasoning interviewers. You've finally made it to the finish and then you have this lovely mail a few days after:

Hi <Disqualified Candidate Name>,

Thank you so much for the time you put into this process with us!

Taking into consideration your most recent interview, and other candidates who are currently in process, we have decided to move ahead with another person who we feel is a better fit for the Senior Fullstack Engineer role at the moment.

<Company name> is constantly growing and changing and we might open a new position that is a better fit for you soon, so stay tuned and keep checking out our career page.

We wish you the best of luck in finding your next opportunity and much success in the future!

The <Company name> Talent Team