Technical Questions Flashcards

(112 cards)

1
Q

Design a pipeline that ingests millions of events per second with very low latency and no data loss (what tech and patterns would be used)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What structures and abilities in python would you use to ingest and process 50GB file? Would python be your language of choice for this?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does concurrency work in c++ and what are some key pitfalls? What does c++ provide for it?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain the difference and usage of SQL, NoSQL, Data Warehouse, and DataLake?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Difference between TCP and UDP and when to use in trading system?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the differences between stack and heap memory. When is each used?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain value semantics vs reference semantics.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why might you override and change the move or copy operator of a class?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are lvalues and rvalues? What is an rvalue reference?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between static, dynamic, and automatic storage duration?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are smart pointers (unique_ptr, shared_ptr, weak_ptr) and when to use each?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a memory pool and why might you use one in low-latency systems?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does C++ memory model affect multithreaded code?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain copy elision and move semantics.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is cache locality, and why does it matter in performance-sensitive systems?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Difference between deep copy vs shallow copy in terms of performance.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How would you profile C++ code for bottlenecks?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain differences between vector, list, deque, and array. When to use each?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are unordered_map vs map, and when would you choose one over the other?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

How would you design a low-latency messaging system in C++?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How would you minimize memory allocation in high-frequency trading?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How would you handle multi-threaded market data updates safely and efficiently?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Explain lock contention and strategies to reduce it in critical systems.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Design a system that processes millions of events per second with minimal latency.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What trade-offs exist between latency and throughput?
26
How do you handle backpressure in a streaming system?
27
Explain push vs pull architectures. When would you use each?
28
How would you guarantee message ordering in a distributed system?
29
What delivery guarantees exist (at-most-once, at-least-once, exactly-once)?
30
How would you design a real-time vs batch processing system?
31
How do you avoid serialization overhead in high-performance systems?
32
How would you design a system to recover from crashes without data loss?
33
Explain stack vs heap allocation and performance trade-offs.
34
What causes heap fragmentation and how can you mitigate it?
35
What is a memory pool and when would you use one?
36
How do custom allocators work in C++?
37
What is placement new and when is it useful?
38
What is cache locality and why does it matter?
39
What is false sharing and how do you prevent it?
40
How does struct padding affect performance?
41
What are cache lines and why are they important?
42
What is branch prediction and how does it affect performance?
43
When would you use prefetching?
44
When would you use vector vs deque vs list?
45
What are the performance characteristics of unordered_map vs map?
46
What is the growth strategy of std::vector?
47
What causes iterator invalidation?
48
Difference between reserve() and resize().
49
What is the difference between push_back and emplace_back?
50
When is a flat structure (vector) better than a tree/map?
51
How would you design a high-performance order book data structure?
52
What is a data race?
53
Difference between mutex, spinlock, and atomic operations.
54
When are atomics sufficient vs needing locks?
55
What is lock contention and how do you reduce it?
56
What is false sharing in multithreaded systems?
57
Explain the ABA problem and how to solve it.
58
What is lock-free vs wait-free?
59
Explain memory ordering (relaxed, acquire/release, seq_cst).
60
How would you design a thread-safe queue?
61
How would you implement a lock-free ring buffer?
62
What is priority inversion and how do you prevent it?
63
Difference between TCP and UDP. When would you use each?
64
What is Nagle’s algorithm and why disable it?
65
What is multicast and why is it used in market data?
66
How do you handle packet loss in UDP systems?
67
How can you reduce network latency in trading systems?
68
What is kernel bypass (DPDK/RDMA) and why is it used?
69
How does a matching engine work?
70
What is price-time priority?
71
How do you handle partial fills?
72
How would you design an order book?
73
How do you track positions and PnL in real time?
74
What happens if a trading engine crashes mid-trade?
75
How would you design a recovery/replay system?
76
How do you ensure consistency across trading components?
77
What tools would you use (perf, valgrind, etc.)?
78
How do you detect memory leaks?
79
What is tail latency (p99) and why does it matter?
80
How do you debug race conditions?
81
What are flame graphs and how are they useful?
82
What is context switching and its cost?
83
Difference between user space and kernel space.
84
What is NUMA and why does it matter?
85
What is CPU affinity and why use it?
86
What are huge pages and when would you use them?
87
Binary vs text protocols: trade-offs?
88
How do Protobuf / FlatBuffers reduce overhead?
89
What is zero-copy serialization?
90
What is endianness and why does it matter?
91
How do you handle schema evolution?
92
What are lvalues and rvalues?
93
What is an rvalue reference?
94
Explain move semantics and copy elision.
95
What are value vs reference semantics?
96
Why override copy/move constructors?
97
What are smart pointers and when to use each?
98
What is the C++ memory model?
99
What are storage durations (static, dynamic, automatic)?
100
When does RVO occur and when does it fail?
101
Why can std::move not actually move?
102
When would you choose latency over throughput?
103
Locking vs lock-free: when and why?
104
Memory usage vs CPU trade-offs?
105
Simplicity vs performance—how do you decide?
106
Vector vs map for real-time systems?
107
When would you avoid dynamic allocation entirely?
108
Where do latency spikes come from?
109
How do you reduce p99 latency?
110
What metrics do you monitor in production?
111
How do you validate performance improvements?
112
How do you safely roll out performance changes?