Citadel·Software Engineer·Technical Phone Screen
Jun 2026
Citadel software engineer interview, technical round focused almost entirely on C++ memory management internals. They wanted a full working SharedPtr implementation from scratch, not just pseudocode, which I wasn't quite expecting at that depth.
- Implement a templated SharedPtr<T> class in C++ with full reference-counting semantics, including default, raw pointer, copy, and move constructors, copy and move assignment, destructor, and the standard dereference and access operators.
- How would you make the reference count in your SharedPtr implementation thread-safe?
- What are the trade-offs between a separate control block and an intrusive reference count, and how does that relate to supporting weak_ptr?
- Explain the aliasing constructor for shared_ptr and when you'd actually use it.
- What are the pitfalls of reference-counted smart pointers with cyclic ownership, and how does weak_ptr address that?
“I started with the control block struct and the constructor from a raw pointer, which felt like the right entry point.” The rest of the author's notes on Software Engineer interview at Citadel, Technical Phone Screen round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post