← Intercontinental Exchange Interview Insights

Intercontinental Exchange·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

30-minute C++ fundamentals screen for a software engineer role at Intercontinental Exchange. Pretty much exactly what you'd expect from a low-level systems shop: containers, polymorphism, memory, and then follow-ups that went deeper than I wanted them to.

Questions Asked (5)

Q1

What are the differences between std::list and std::vector, and when would you choose one over the other?

Technical Trade-offsAlgorithms & Data Structures
Author's notes

I started with the obvious stuff, contiguous memory vs nodes, and insertion cost.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining both containers in terms of their underlying data structures (dynamic array vs. doubly-linked list), then systematically compare their performance characteristics for common operations like insertion, deletion, and access. Conclude with practical guidelines for when to choose each, emphasizing that std::vector is the default choice unless specific requirements favor std::list.

Pro tip: Mention that std::vector's contiguous memory layout provides better cache locality and is often faster even for insertions in the middle for small datasets due to lower constant factors, but std::list guarantees O(1) insertion/deletion when you already have an iterator to the position.

1. Describe underlying data structures

Explain that std::vector is a dynamic array with contiguous memory, while std::list is a doubly-linked list with nodes scattered in memory.

2. Compare time complexities for key operations

Contrast access (O(1) vs. O(n)), insertion/deletion at ends (amortized O(1) vs. O(1)), and insertion/deletion in the middle (O(n) vs. O(1) with iterator).

3. Discuss memory and cache considerations

Highlight that std::vector has better cache locality and lower memory overhead per element, while std::list has higher overhead due to pointers and poor cache performance.

4. Address iterator and reference invalidation

Note that std::vector invalidates iterators/references on reallocation, while std::list only invalidates iterators/references to erased elements.

5. Provide selection guidelines

Recommend std::vector as the default container; choose std::list when frequent insertions/deletions in the middle are needed and iterators to elements must remain valid, or when stable references are required.

Key Points to Mention

  • std::vector provides O(1) random access, while std::list provides O(n) access.
  • std::list offers O(1) insertion and deletion anywhere if you have an iterator to the position; std::vector requires shifting elements, making it O(n).
  • std::vector has better cache locality and lower memory overhead per element compared to std::list.
  • Iterator and reference invalidation rules differ: std::vector invalidates on reallocation, std::list only invalidates erased elements.
  • std::vector is generally preferred unless specific requirements (e.g., frequent middle insertions/deletions, stable iterators) dictate otherwise.
  • Consider using std::deque or other containers as alternatives when both ends need efficient insertion/deletion.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Explain polymorphism in C++. How does compile-time polymorphism differ from runtime polymorphism, and what's actually happening under the hood with virtual functions?

Technical Trade-offsSystem Design
Author's notes

Went fine up to vtables and then they asked about object slicing, which I half-blanked on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining polymorphism and distinguishing compile-time (static) from runtime (dynamic) polymorphism. Then explain the underlying mechanisms, especially virtual functions and the vtable/vptr, and discuss trade-offs like performance and flexibility.

Pro tip: Mention that virtual functions introduce a level of indirection and can inhibit inlining, but they enable extensibility; also note that final and override keywords can help the compiler devirtualize calls.

1. Define Polymorphism

Explain that polymorphism allows objects of different types to be treated as instances of a common base type, enabling a single interface to represent multiple behaviors.

2. Compile-time vs Runtime

Contrast compile-time polymorphism (function overloading, templates) resolved at compile time with runtime polymorphism (virtual functions) resolved at runtime via dynamic dispatch.

3. Under the Hood: Virtual Functions

Describe how virtual functions are implemented using a virtual table (vtable) and virtual pointer (vptr). Each class with virtual functions has a vtable, and each object has a vptr pointing to its class's vtable.

4. Dynamic Dispatch Mechanism

Explain that when a virtual function is called through a base pointer/reference, the compiler generates code to look up the function address in the vtable via the vptr, enabling the correct derived class function to be invoked.

5. Trade-offs and Considerations

Discuss performance overhead (indirection, no inlining), memory overhead (vptr per object, vtable per class), and design implications (e.g., virtual destructors, pure virtual functions).

Key Points to Mention

  • Compile-time polymorphism: function overloading, templates, CRTP (Curiously Recurring Template Pattern).
  • Runtime polymorphism: virtual functions, inheritance, dynamic binding.
  • Virtual table (vtable) and virtual pointer (vptr) implementation details.
  • Performance overhead: vtable lookup, inability to inline, increased object size.
  • Use of override and final specifiers for safety and optimization.
  • Virtual destructors to ensure proper cleanup in polymorphic hierarchies.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

How do pointers and references differ in C++, and what are the implications for const-correctness?

Technical Trade-offs
Author's notes

Straightforward.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining pointers and references in C++, highlighting their syntactic and semantic differences, then explain how these differences affect const-correctness. Use concrete examples to illustrate key points, and connect the discussion to practical implications in software engineering, such as API design and safety.

Pro tip: Emphasize that references are often preferred in modern C++ for their safety and clarity, but pointers are necessary for optional or reassignable semantics. Mention that const-correctness with references can be more intuitive, but pointers offer finer-grained control over constness of the pointer itself versus the pointee.

1. Define Pointers and References

Briefly define what pointers and references are in C++, noting that a pointer is a variable that holds a memory address and can be reassigned or null, while a reference is an alias for an existing object and must be initialized and cannot be reseated.

2. Compare Syntax and Semantics

Explain key syntactic differences: pointers use * and ->, references use & and .; pointers can be null, references cannot; pointers can be reassigned, references cannot. Discuss how these affect usage in function parameters and return types.

3. Explain Const-Correctness with Pointers

Describe the four combinations of const with pointers: pointer to const, const pointer, const pointer to const, and non-const pointer to non-const. Give examples of each and explain how they enforce immutability at different levels.

4. Explain Const-Correctness with References

Discuss that references themselves are inherently const (cannot be reseated), but const references (const T&) are used to bind to temporaries and prevent modification of the referred object. Contrast with pointers where constness can apply to the pointer or the pointee.

5. Discuss Implications and Trade-offs

Summarize practical implications: references provide safer, cleaner syntax and are preferred for pass-by-reference when null is not needed; pointers are necessary for optional parameters, dynamic memory, and polymorphism. Const-correctness with references is simpler but less flexible than with pointers.

Key Points to Mention

  • Pointers can be null and reassigned; references cannot be null and must be initialized.
  • References are syntactic sugar for pointers in many cases but with stricter rules.
  • Const with pointers: const T* (pointer to const), T* const (const pointer), const T* const (const pointer to const).
  • Const with references: const T& (reference to const) is common for read-only access and binding to temporaries.
  • References are generally preferred for function parameters when the argument is required and no reassignment is needed.
  • Pointers offer more flexibility for optional parameters, dynamic memory management, and implementing data structures.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q4

What is RAII and how do smart pointers like unique_ptr and shared_ptr implement it?

Technical Trade-offsSystem Design
Author's notes

This one I actually felt good about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining RAII as a C++ idiom that binds resource lifetime to object lifetime, then explain how unique_ptr and shared_ptr embody it through ownership semantics and automatic destruction. Use concrete examples to show how each smart pointer acquires and releases resources, highlighting the trade-offs between exclusive and shared ownership.

Pro tip: Mention that RAII is not just for memory—it applies to any resource like file handles, sockets, and mutexes—and that smart pointers are just one application. This shows you understand the broader principle and can apply it in system design.

1. Define RAII

Explain RAII as Resource Acquisition Is Initialization: resource acquisition happens in a constructor, and release happens in the destructor. Emphasize that it guarantees deterministic cleanup even in the presence of exceptions.

2. Explain unique_ptr

Describe unique_ptr as a smart pointer that models exclusive ownership. It acquires a resource in its constructor, deletes it in its destructor, and cannot be copied—only moved—ensuring a single owner.

3. Explain shared_ptr

Describe shared_ptr as a smart pointer that models shared ownership using reference counting. The resource is released when the last shared_ptr is destroyed or reset, implementing RAII for shared resources.

4. Contrast and discuss trade-offs

Compare unique_ptr (zero overhead, exclusive) with shared_ptr (reference counting overhead, shared). Mention when to use each and potential pitfalls like cyclic references with shared_ptr.

5. Conclude with broader implications

Summarize that RAII and smart pointers are fundamental to writing exception-safe, leak-free C++ code, and that the principle extends beyond memory management.

Key Points to Mention

  • RAII ties resource lifetime to object lifetime, ensuring deterministic cleanup.
  • unique_ptr uses exclusive ownership with move semantics and no reference counting overhead.
  • shared_ptr uses reference counting to manage shared ownership, with control block overhead.
  • Both smart pointers call delete (or custom deleter) in their destructors.
  • RAII applies to non-memory resources like file handles, mutexes, and network connections.
  • Exception safety: RAII guarantees resource release during stack unwinding.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q5

Walk me through the difference between copy semantics and move semantics in C++.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

Fine for the basics.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining copy semantics as duplicating resources and move semantics as transferring ownership, then contrast their performance and use cases. Use a concrete example like a dynamic array or string to illustrate the difference, and mention how move semantics enable efficient resource management in modern C++.

Pro tip: Emphasize that move semantics are not just about performance but also about expressing ownership transfer, which is crucial for writing exception-safe and resource-efficient code. Mention that understanding when moves are implicitly generated (e.g., Rule of Five) is key in real-world code reviews.

1. Define copy semantics

Explain that copy semantics create a new object as a duplicate of an existing one, typically involving deep copying of resources. Mention that this can be expensive for large objects.

2. Define move semantics

Explain that move semantics transfer resources from a temporary (rvalue) to a new object, leaving the source in a valid but unspecified state. This avoids expensive deep copies.

3. Contrast with an example

Use a simple class like a dynamic array or std::string to show how copy duplicates the buffer while move steals the pointer. Highlight the performance difference.

4. Discuss language features

Mention C++11 rvalue references, move constructors, move assignment operators, and std::move. Explain how the compiler chooses between copy and move based on value categories.

5. Relate to best practices

Talk about the Rule of Five, when to define move operations, and how move semantics enable efficient use of standard containers and algorithms.

Key Points to Mention

  • Copy semantics duplicate resources, leading to O(n) time and memory overhead; move semantics transfer ownership in O(1) time.
  • Move operations are invoked for rvalues (temporaries) and are key to optimizing return-by-value and container operations.
  • The compiler implicitly generates move constructors/assignment only if no user-declared copy operations, destructor, or move operations exist.
  • std::move is a cast to rvalue reference, enabling move semantics; it does not itself move anything.
  • After a move, the source object must be left in a valid state (e.g., null pointer) to avoid undefined behavior.
  • Move semantics are essential for implementing unique ownership (e.g., std::unique_ptr) and efficient resource management.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.