InterviewLegend

Container, LRU & OO Design

Frequently asked
Alex Chen50 min readUpdated 33 real interview reports

Every C++ program leans on the same three containers: a growable array, a hash map, a linked list. You have used them a thousand times. Intel wants to see you build them once. This round is "implement the machinery and defend the design," not "solve a puzzle," and the STL type you would normally reach for is exactly the one you are not allowed to use. The question underneath is plain: do you know what push_back actually costs, or do you just call it?

The round has a rhythm. It opens with one structure, usually the dynamic array, and asks you to write the class, not describe it. A few minutes in, the questions turn from "does it work" to "what does it cost" and "what runs when the destructor fires." Say you wrote a working array but cannot explain why doubling the capacity keeps push amortized constant. Or you forget that the class now owns a raw pointer it has to free, copy, and move correctly. Either way you have answered half the question. Expect the pivot from code to reasoning and pace yourself for it.

The Intel angle
Asking you to reimplement std::vector is Intel checking whether you know the machine under the abstraction. A candidate who only ever consumed containers describes them in verbs. It grows. It stores. It hands things back. A candidate who has written low-level C++ reaches for the buffer, the capacity, the reallocation, the special member functions, without being led there. Intel writes compilers, runtimes, and the oneTBB containers that sit under other people's code, so this is home turf for the person across the table. If you have hand-rolled a container, an allocator, a lock-free ring in real work, say so early. It turns the round from an exam into a conversation between two people who have both been under the hood.
What's inside
  • 1 problem, worked step by step
  • 1 diagram
  • about 50 min

Premium lessonIntel interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

Had your Intel interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Intel interview guide

Know what Intel asks before you walk in.

12 coding · 3 system design · 13 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.