Caching & Precomputation
Many of LinkedIn's class problems give the constructor a dataset and then query it many times. One gives you a fixed list of known words, and another gives you a tokenized job posting. When candidates get rejected on the first one, the feedback names a precomputation they skipped. Do that work in the constructor. Then each query after it can be a lookup or a short merge, which is what the interviewer is waiting to see.
The other two are different. They keep state that changes as you go. One draws a member at random, weighted by ticket count, while tickets are added and removed, all in O(1) average time. The other is a cache that evicts by a rank the caller owns. Its follow-up usually makes it thread-safe and asks you to name the race condition behind every lock. Both build on the Data Structure Design lesson and reuse its pairing of a hash map with a second structure.
add, remove or an uneven input once the base version works.LinkedInPremium lesson · Coding round
The 4 LinkedIn problems are below.
- A Premium questionCoding · Medium · Signature problem
- A Premium questionCoding · Medium · Signature problem
- A Premium questionCoding · Hard · Frequently asked
+ 1 more in this lesson
Each with hints, the follow-up and a tested solution.
Get the LinkedIn questions$49 a year · all 100 companies · cancel anytime
From 1,074 LinkedIn reports, forum threads behind logins and write-ups in Chinese.
LinkedIn interview guideKnow what LinkedIn asks before you walk in.
28 coding · 5 system design · 26 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.