question stringlengths 13 210 | type stringclasses 3
values | module_number int64 1 10 | module stringclasses 10
values | lesson stringlengths 13 59 | lesson_url stringlengths 114 129 |
|---|---|---|---|---|---|
Your loop over the day's quotes is O(n). Another team's loop is also O(n) and runs in half the time on the same data. What would you look at first? | lesson opening question | 1 | Reading hot code | What Big-O leaves out | https://academicquant.co.uk/qd-cost-model?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why might one O(n) loop be several times slower than another? | interview question | 1 | Reading hot code | What Big-O leaves out | https://academicquant.co.uk/qd-cost-model?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is a hot path? | interview question | 1 | Reading hot code | What Big-O leaves out | https://academicquant.co.uk/qd-cost-model?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Walk me through how you would review this loop for performance. | interview question | 1 | Reading hot code | What Big-O leaves out | https://academicquant.co.uk/qd-cost-model?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Is Big-O useless for low-latency work then? | interview question | 1 | Reading hot code | What Big-O leaves out | https://academicquant.co.uk/qd-cost-model?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You keep the last few thousand quotes for one contract and walk all of them on every update. Would you store them in a std::vector or a std::list, and why? | lesson opening question | 1 | Reading hot code | Vector and list: where the data actually sits | https://academicquant.co.uk/qd-memory-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why is iterating over a vector faster than over a linked list when both are O(n)? | interview question | 1 | Reading hot code | Vector and list: where the data actually sits | https://academicquant.co.uk/qd-memory-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When would you use std::list? | interview question | 1 | Reading hot code | Vector and list: where the data actually sits | https://academicquant.co.uk/qd-memory-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Isn't inserting in the middle of a vector O(n)? Doesn't that favour the list? | interview question | 1 | Reading hot code | Vector and list: where the data actually sits | https://academicquant.co.uk/qd-memory-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You said the vector is faster because nearby memory is cheaper to read. Why is nearby memory cheaper? | lesson opening question | 1 | Reading hot code | Cache lines, locality and pointer chasing | https://academicquant.co.uk/qd-cache-lines?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is a cache line and why does it matter? | interview question | 1 | Reading hot code | Cache lines, locality and pointer chasing | https://academicquant.co.uk/qd-cache-lines?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is pointer chasing? | interview question | 1 | Reading hot code | Cache lines, locality and pointer chasing | https://academicquant.co.uk/qd-cache-lines?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You have a std::vector of unique_ptr to orders. Is that cache-friendly? | interview question | 1 | Reading hot code | Cache lines, locality and pointer chasing | https://academicquant.co.uk/qd-cache-lines?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
This handler builds an order for every quote it acts on. There is no new anywhere in it. Does it allocate? | lesson opening question | 1 | Reading hot code | Allocation on the hot path | https://academicquant.co.uk/qd-hot-allocation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why avoid heap allocation on the hot path? | interview question | 1 | Reading hot code | Allocation on the hot path | https://academicquant.co.uk/qd-hot-allocation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you find hidden allocations? | interview question | 1 | Reading hot code | Allocation on the hot path | https://academicquant.co.uk/qd-hot-allocation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What would you do instead of allocating per message? | interview question | 1 | Reading hot code | Allocation on the hot path | https://academicquant.co.uk/qd-hot-allocation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is sizeof this struct, and could you make it smaller without removing a field? Then: where in this function is the struct copied? | lesson opening question | 1 | Reading hot code | Copies, moves and object layout | https://academicquant.co.uk/qd-copies-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How would you shrink this struct without removing fields? | interview question | 1 | Reading hot code | Copies, moves and object layout | https://academicquant.co.uk/qd-copies-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Should I always pass by const reference? | interview question | 1 | Reading hot code | Copies, moves and object layout | https://academicquant.co.uk/qd-copies-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why put a static_assert on sizeof? | interview question | 1 | Reading hot code | Copies, moves and object layout | https://academicquant.co.uk/qd-copies-layout?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
This loop has an if inside it. When is that if expensive, and when is it essentially free? | lesson opening question | 1 | Reading hot code | Branches, indirect calls and inlining | https://academicquant.co.uk/qd-branches-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is a branch misprediction and what does it cost? | interview question | 1 | Reading hot code | Branches, indirect calls and inlining | https://academicquant.co.uk/qd-branches-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How would you deal with an unpredictable branch in a hot loop? | interview question | 1 | Reading hot code | Branches, indirect calls and inlining | https://academicquant.co.uk/qd-branches-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why are indirect calls slower than direct ones? | interview question | 1 | Reading hot code | Branches, indirect calls and inlining | https://academicquant.co.uk/qd-branches-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Your strategies all derive from a base class with a virtual on_quote. Someone says virtual calls are slow. Are they right? | lesson opening question | 1 | Reading hot code | Virtual functions and vtables | https://academicquant.co.uk/qd-virtual-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How expensive is a virtual function call? | interview question | 1 | Reading hot code | Virtual functions and vtables | https://academicquant.co.uk/qd-virtual-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you avoid virtual dispatch on the hot path? | interview question | 1 | Reading hot code | Virtual functions and vtables | https://academicquant.co.uk/qd-virtual-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Where does the vptr live and what does it cost in memory? | interview question | 1 | Reading hot code | Virtual functions and vtables | https://academicquant.co.uk/qd-virtual-calls?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
The feed handler stores its callback as std::function<void(const Quote&)>. Is that a problem on the hot path? | lesson opening question | 1 | Reading hot code | std::function, std::any and the cost of type erasure | https://academicquant.co.uk/qd-type-erasure?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Is std::function slow? | interview question | 1 | Reading hot code | std::function, std::any and the cost of type erasure | https://academicquant.co.uk/qd-type-erasure?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What would you use instead of std::function for a hot callback? | interview question | 1 | Reading hot code | std::function, std::any and the cost of type erasure | https://academicquant.co.uk/qd-type-erasure?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is type erasure? | interview question | 1 | Reading hot code | std::function, std::any and the cost of type erasure | https://academicquant.co.uk/qd-type-erasure?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You rewrote a function and your benchmark says it is three times faster. What would make you doubt that number? | lesson opening question | 1 | Reading hot code | Benchmarking without fooling yourself | https://academicquant.co.uk/qd-benchmarking?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How would you benchmark a small C++ function? | interview question | 1 | Reading hot code | Benchmarking without fooling yourself | https://academicquant.co.uk/qd-benchmarking?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is the most common mistake in microbenchmarks? | interview question | 1 | Reading hot code | Benchmarking without fooling yourself | https://academicquant.co.uk/qd-benchmarking?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Your benchmark shows a speed-up. How do you convince a sceptical colleague? | interview question | 1 | Reading hot code | Benchmarking without fooling yourself | https://academicquant.co.uk/qd-benchmarking?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Here is our quote handler. Take five minutes, tell me everything that worries you, and tell me what you would fix first. | lesson opening question | 1 | Reading hot code | The cost model, all at once | https://academicquant.co.uk/qd-cost-review?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Review this handler for latency. What do you change first? | interview question | 1 | Reading hot code | The cost model, all at once | https://academicquant.co.uk/qd-cost-review?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you decide which of several issues matters most? | interview question | 1 | Reading hot code | The cost model, all at once | https://academicquant.co.uk/qd-cost-review?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What would you leave alone? | interview question | 1 | Reading hot code | The cost model, all at once | https://academicquant.co.uk/qd-cost-review?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Both our loops over the day's quotes are O(n). Ours takes twice as long. Why might that be? | drill prompt | 1 | Reading hot code | Drill: reading hot code | https://academicquant.co.uk/qd-drill-hot-code?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
We keep the recent quotes for a contract and walk all of them on every update. Vector or list? | drill prompt | 1 | Reading hot code | Drill: reading hot code | https://academicquant.co.uk/qd-drill-hot-code?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You keep saying contiguous memory is faster. Explain why, at the level of the hardware. | drill prompt | 1 | Reading hot code | Drill: reading hot code | https://academicquant.co.uk/qd-drill-hot-code?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
This handler builds a std::string tag, pushes into a local std::vector and creates a shared_ptr for every order. There is no new in it. Does it allocate? | drill prompt | 1 | Reading hot code | Drill: reading hot code | https://academicquant.co.uk/qd-drill-hot-code?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Your new version benchmarks three times faster. Convince me. | drill prompt | 1 | Reading hot code | Drill: reading hot code | https://academicquant.co.uk/qd-drill-hot-code?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
This function returns a reference to the best price level. It compiles without a warning and works in the unit test. Why does it crash in production? | lesson opening question | 2 | Safe C++ | When an object's life begins and ends | https://academicquant.co.uk/qd-object-lifetime?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When is a temporary destroyed? | interview question | 2 | Safe C++ | When an object's life begins and ends | https://academicquant.co.uk/qd-object-lifetime?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you find dangling references in a large codebase? | interview question | 2 | Safe C++ | When an object's life begins and ends | https://academicquant.co.uk/qd-object-lifetime?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
In what order are members destroyed, and why does it matter? | interview question | 2 | Safe C++ | When an object's life begins and ends | https://academicquant.co.uk/qd-object-lifetime?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Explain RAII. Then tell me what is wrong with this function that takes a mutex, writes to a socket and releases the mutex. | lesson opening question | 2 | Safe C++ | RAII: tying every resource to an object | https://academicquant.co.uk/qd-raii?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is RAII? | interview question | 2 | Safe C++ | RAII: tying every resource to an object | https://academicquant.co.uk/qd-raii?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why is RAII important for exception safety? | interview question | 2 | Safe C++ | RAII: tying every resource to an object | https://academicquant.co.uk/qd-raii?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is the rule of five, and the rule of zero? | interview question | 2 | Safe C++ | RAII: tying every resource to an object | https://academicquant.co.uk/qd-raii?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Is there a performance cost to RAII? | interview question | 2 | Safe C++ | RAII: tying every resource to an object | https://academicquant.co.uk/qd-raii?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Our order manager stores every live order in a std::shared_ptr and hands copies to the risk checker and the gateway. What does that cost, and would you do it differently? | lesson opening question | 2 | Safe C++ | unique_ptr, shared_ptr and weak_ptr | https://academicquant.co.uk/qd-smart-pointers?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When would you use shared_ptr versus unique_ptr? | interview question | 2 | Safe C++ | unique_ptr, shared_ptr and weak_ptr | https://academicquant.co.uk/qd-smart-pointers?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What does shared_ptr cost? | interview question | 2 | Safe C++ | unique_ptr, shared_ptr and weak_ptr | https://academicquant.co.uk/qd-smart-pointers?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is weak_ptr for? | interview question | 2 | Safe C++ | unique_ptr, shared_ptr and weak_ptr | https://academicquant.co.uk/qd-smart-pointers?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why prefer make_shared? | interview question | 2 | Safe C++ | unique_ptr, shared_ptr and weak_ptr | https://academicquant.co.uk/qd-smart-pointers?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
A colleague replaced const std::string& parameters with std::string_view across the feed parser and one test started failing intermittently. What would you look for? | lesson opening question | 2 | Safe C++ | Dangling views: string_view and span | https://academicquant.co.uk/qd-views?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When would you use string_view over const std::string&? | interview question | 2 | Safe C++ | Dangling views: string_view and span | https://academicquant.co.uk/qd-views?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How can a string_view dangle? | interview question | 2 | Safe C++ | Dangling views: string_view and span | https://academicquant.co.uk/qd-views?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is std::span? | interview question | 2 | Safe C++ | Dangling views: string_view and span | https://academicquant.co.uk/qd-views?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What does std::move do? And why can marking a move constructor noexcept make a vector of orders much faster to grow? | lesson opening question | 2 | Safe C++ | Move semantics without the mystery | https://academicquant.co.uk/qd-move-semantics?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What does std::move do? | interview question | 2 | Safe C++ | Move semantics without the mystery | https://academicquant.co.uk/qd-move-semantics?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why should move constructors be noexcept? | interview question | 2 | Safe C++ | Move semantics without the mystery | https://academicquant.co.uk/qd-move-semantics?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What state is an object in after it has been moved from? | interview question | 2 | Safe C++ | Move semantics without the mystery | https://academicquant.co.uk/qd-move-semantics?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is copy elision? | interview question | 2 | Safe C++ | Move semantics without the mystery | https://academicquant.co.uk/qd-move-semantics?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
This code registers a callback that fires when an order is acknowledged. It works for a while and then crashes. What is wrong? | lesson opening question | 2 | Safe C++ | Lambdas and what they capture | https://academicquant.co.uk/qd-lambda-captures?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When is capturing by reference in a lambda dangerous? | interview question | 2 | Safe C++ | Lambdas and what they capture | https://academicquant.co.uk/qd-lambda-captures?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What does capturing this mean? | interview question | 2 | Safe C++ | Lambdas and what they capture | https://academicquant.co.uk/qd-lambda-captures?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you move a unique_ptr into a lambda? | interview question | 2 | Safe C++ | Lambdas and what they capture | https://academicquant.co.uk/qd-lambda-captures?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Your book keeps a std::vector of orders and an index from order id to Order*. After a burst of new orders, a cancel corrupts memory. Why? | lesson opening question | 2 | Safe C++ | Iterator invalidation and stable handles | https://academicquant.co.uk/qd-invalidation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When does push_back invalidate iterators? | interview question | 2 | Safe C++ | Iterator invalidation and stable handles | https://academicquant.co.uk/qd-invalidation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you erase elements from a container while iterating over it? | interview question | 2 | Safe C++ | Iterator invalidation and stable handles | https://academicquant.co.uk/qd-invalidation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How would you refer to orders that may be cancelled or reused? | interview question | 2 | Safe C++ | Iterator invalidation and stable handles | https://academicquant.co.uk/qd-invalidation?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You receive a binary market-data message in a char buffer. Someone wrote reinterpret_cast<const Header*>(buf) to read the header. Is that correct? | lesson opening question | 2 | Safe C++ | Casts, aliasing and reading bytes safely | https://academicquant.co.uk/qd-casts?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is the difference between static_cast and reinterpret_cast? | interview question | 2 | Safe C++ | Casts, aliasing and reading bytes safely | https://academicquant.co.uk/qd-casts?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is strict aliasing? | interview question | 2 | Safe C++ | Casts, aliasing and reading bytes safely | https://academicquant.co.uk/qd-casts?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you parse a binary message from a byte buffer? | interview question | 2 | Safe C++ | Casts, aliasing and reading bytes safely | https://academicquant.co.uk/qd-casts?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
`const Level& top(const Instrument& i) { auto book = snapshot(i); return book.levels[0]; }` What is wrong with this? | drill prompt | 2 | Safe C++ | Drill: lifetime and ownership | https://academicquant.co.uk/qd-drill-safe-cpp?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
A function creates an order as a local, sends it, and registers `[&](const Ack& a) { order.status = a.status; }` to run when the exchange acknowledges. Problems? | drill prompt | 2 | Safe C++ | Drill: lifetime and ownership | https://academicquant.co.uk/qd-drill-safe-cpp?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Every order is a std::shared_ptr<Order>, copied to the risk checker, the gateway and the logger. Is that a problem? | drill prompt | 2 | Safe C++ | Drill: lifetime and ownership | https://academicquant.co.uk/qd-drill-safe-cpp?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
`std::string_view venue() const { return std::string(venue_code_) + "-" + region_; }` Comment. | drill prompt | 2 | Safe C++ | Drill: lifetime and ownership | https://academicquant.co.uk/qd-drill-safe-cpp?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
A book stores orders in a std::vector<Order> and keeps an unordered_map<OrderId, Order*>. Cancels sometimes corrupt memory after a busy period. Why? | drill prompt | 2 | Safe C++ | Drill: lifetime and ownership | https://academicquant.co.uk/qd-drill-safe-cpp?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
You need to keep the active orders for one instrument, look them up by id, and walk them in price order. Which containers would you use? | lesson opening question | 3 | Containers and memory | Choosing a container by what it does in memory | https://academicquant.co.uk/qd-container-choice?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How do you choose a container? | interview question | 3 | Containers and memory | Choosing a container by what it does in memory | https://academicquant.co.uk/qd-container-choice?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why not just use std::map everywhere for ordered data? | interview question | 3 | Containers and memory | Choosing a container by what it does in memory | https://academicquant.co.uk/qd-container-choice?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is a flat hash map? | interview question | 3 | Containers and memory | Choosing a container by what it does in memory | https://academicquant.co.uk/qd-container-choice?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
push_back on a vector is amortised O(1). What does amortised hide, and how would you make it O(1) every time on a hot path? | lesson opening question | 3 | Containers and memory | vector: size, capacity and growth | https://academicquant.co.uk/qd-vector-growth?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is the difference between size and capacity? | interview question | 3 | Containers and memory | vector: size, capacity and growth | https://academicquant.co.uk/qd-vector-growth?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why is push_back amortised constant time? | interview question | 3 | Containers and memory | vector: size, capacity and growth | https://academicquant.co.uk/qd-vector-growth?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When would you use emplace_back? | interview question | 3 | Containers and memory | vector: size, capacity and growth | https://academicquant.co.uk/qd-vector-growth?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Most order lookups take a few hundred nanoseconds, but a few take tens of microseconds. The lookup is an unordered_map from order id to order. What might cause the slow ones? | lesson opening question | 3 | Containers and memory | Hash maps: buckets, load factor and rehashing | https://academicquant.co.uk/qd-hash-maps?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
How does std::unordered_map work internally? | interview question | 3 | Containers and memory | Hash maps: buckets, load factor and rehashing | https://academicquant.co.uk/qd-hash-maps?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Why might hash map lookups have a long tail? | interview question | 3 | Containers and memory | Hash maps: buckets, load factor and rehashing | https://academicquant.co.uk/qd-hash-maps?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
What is open addressing and what does it trade? | interview question | 3 | Containers and memory | Hash maps: buckets, load factor and rehashing | https://academicquant.co.uk/qd-hash-maps?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Give me one situation where std::map is the right choice over std::unordered_map, one for std::deque, and one for std::list. | lesson opening question | 3 | Containers and memory | map, list and deque: when nodes and blocks earn their place | https://academicquant.co.uk/qd-map-list-deque?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
When would you use std::map instead of std::unordered_map? | interview question | 3 | Containers and memory | map, list and deque: when nodes and blocks earn their place | https://academicquant.co.uk/qd-map-list-deque?utm_source=huggingface&utm_medium=post&utm_campaign=hf-hft-interview-questions |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.