From my research, it looks like LinkedIn and Dropbox likes to ask questions related to multi-threading during the coding interviews. Where do you suggest I look for multi-threading coding problems (LC has none)?
Just add a lock here and a lock there...
Just keep adding locks? Lol
Now don’t get too kinky, son. The right approach is to use database for everything.
Suggest lock-free programming. I swear half of the CS people are not familiar with lock-free and wait-free concepts!
Yeah....no. Don't do this...
only in very limited cases like single writer multiple readers etc. When you have multiple writers there's no other choice than locking.
What is a thread?
Just add lock before every write. They will be happy
You use Java?
Yes. Know any good source for multi-threading java questions?
I never prepared for them. But, I have done multi threading. So, I can help you with whatever knowledge that I have, if you are interested 😊
Interviews are the only place they use/demonstrate their multi-threading knowledge. @LinkedIn @Dropbox
Cracking the code interview has basic questions. I think it’s a good start.
Read about lock ordering and lock hierarchies (google it), it explains how to avoid deadlocks when doing multi-threading, and you’ll be killing two birds with one Nokia 510.
I'm old school but I learned multithreading from Boost.Thread docs & Wikipedia 🤷♂️ But, you should also really understand how things like immutability, limiting shared state, and pass-by-value affect the need for locking constructs & the trade-offs. Studying how Rust and Go handle concurrency will give different perspectives -- Dropbox uses Rust in places. Haskell supports traditional multithreading patterns and CSP based concurrency (like Go) and the immutability provides good safety guarantees. I'd say fuck the interview and learn about modern concurrency & async because it's pretty damn important. MT is a prereq for some of that, but its not the end goal anymore.
Lol can confirm. Dropbox leads every question to multi threading.
the irony is real given they're a Python shop 🤣🤣
Hahaha