Software engineering and tech interview questions: the 122 topics they test

Technical questions in a software engineering and tech interview come back to these 122 topics, from 18 guides of the Academy. Each one is the rule to know in one sentence, linked to its guide: the why, a worked example and a timed quiz are there.

Coding and algorithms

Predict what tricky Python prints, spot copies and shared references at a glance, and give the complexity of any loop or data structure before the interviewer finishes the question.

  1. Shared references, copies and mutable defaults. Assignment in Python copies the reference, not the object, so b = a shares the same list, while a[:] or .copy() makes a new one.
  2. Closures, scope, generators and in-place methods. A closure reads its variables when called, so lambdas made in a loop all see the last value unless bound with lambda i=i: i.
  3. Numbers, slices and truthiness. In Python 3, / always returns a float and // floors, keeping a float if either side is one.
  4. Counting loops and recursion. Count how far each loop's counter moves: a counter that doubles runs about log₂ n times, and independent nested loops multiply.
  5. Choosing the right data structure. Membership tests and lookups cost O(1) on average in a set or dict but O(n) in a list.
  6. Searching, sorting and the top k. A binary search must move a bound past the middle, lo = mid + 1, or it can loop for ever.
  7. Why append is O(1) even though it copies. A dynamic array that grows its capacity by a fixed proportion when full makes each append cost O(1) amortised.

SQL and data analysis

Write queries that return the right rows: count joins before running them, handle NULL without losing data, filter groups with HAVING, rank with window functions and keep queries fast and safe.

  1. Joins and how many rows they return. An INNER JOIN returns one row per matching pair, and a LEFT JOIN adds one row with NULL columns for each unmatched left row.
  2. NULL: three-valued logic. Any comparison with NULL is unknown, so WHERE status = NULL returns nothing and IS NULL is the only test.
  3. GROUP BY, HAVING and the order of evaluation. A query runs logically FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, so WHERE filters rows before grouping and HAVING filters groups.
  4. Window functions: running totals, ranks and changes. A window function adds a value to each row without collapsing them: SUM(pnl) OVER (ORDER BY day) is a running total.
  5. Indexes, transactions and silent traps. An index speeds reads but slows writes, and a composite index on (desk, trade_date) serves desk or desk and date but not date alone.
  6. When the planner ignores your index. An index pays only for selective filters: each matching row costs about one random page read, while a full scan reads every page in sequence.

Software engineering in practice

Write code that a bank can run in production: safe threads, reliable tests, the Java and Python traps that cause real incidents, and the habits reviewers look for.

  1. Threads, races, deadlocks and the GIL. An unguarded counter++ shared by threads loses updates because it reads, adds and writes in 3 steps, so use a lock or an AtomicInteger.
  2. Tests that are fast, deterministic and useful. Unit tests should be fast and deterministic, so external services are mocked and tested apart, and the clock and time zone are injected.
  3. Java, Python and C++ traps behind real incidents. Equal Java objects must return equal hash codes or HashMap lookups miss, and an ever-growing static map leaks memory despite garbage collection.
  4. The cost of everyday operations. list.pop(0) shifts every other item, O(n), while deque.popleft() is O(1).
  5. Shipping safely: secrets, git, versions and flags. A live API key pushed to a shared branch must be revoked and rotated before any clean-up.
  6. Design, text encoding, sensitive data and HTTP. A factory behind a shared interface adds formats without touching callers, and PUT is idempotent, while POST creates again.
  7. Amdahl's law: the serial part caps the speed-up. A job whose share p runs in parallel on N cores takes at best (1 − p) + p ÷ N of its original time.

Machine learning in practice

Read a model's scores like a reviewer: precision, recall, F1 and AUC, bias against variance, leaks that make results too good, features that behave, and the A/B test that decides.

  1. Precision, recall, F1, AUC and calibration. Precision is the share of flags that are right, recall the share of positives caught, and F1 their harmonic mean 2PR ÷ (P + R).
  2. Imbalanced classes and the decision threshold. When positives are rare, a model that predicts the majority class scores high accuracy and catches nothing.
  3. Bias, variance and honest validation. Low training error with high validation error is variance, cured by more data, regularisation or a simpler model; high, close errors are bias.
  4. Leaks, group splits and drift. Scores that look too good usually come from leakage, so split by group and check when each feature becomes known.
  5. Features: scaling, encoding, selection and odds. Trees ignore a feature's scale while distance-based and penalised models depend on it, and PCA on raw data follows the largest variance.
  6. Choosing the model: clusters, boosting and recommendations. k-means assumes compact, round clusters, so it cuts rings in the wrong place where spectral clustering or DBSCAN do not.
  7. Precision falls with the base rate. A detector's recall and false positive rate do not depend on how common positives are, but its precision does.

Product analytics and A/B tests

Run experiments a sceptical reviewer would accept: size them, read p-values and intervals honestly, spot broken tests, multiply funnels, and keep seasonality and luck out of conclusions.

  1. Sample size, power and variance reduction. At 5% significance and 80% power, each variant needs about 16 × p(1 − p) ÷ δ² users, δ being the absolute lift.
  2. z-statistics, intervals, peeking and many metrics. The z-statistic of 2 conversion rates is their difference ÷ the pooled standard error √(p(1 − p) × (1/n₁ + 1/n₂)).
  3. Designing tests that can be trusted. Before reading a test, check that the split matches the plan, since a sample ratio mismatch means users are lost.
  4. Funnels, revenue per visitor and proxy metrics. Funnel conversion is the product of its step rates, so a step's relative gain lifts the total by the same share.
  5. Product metrics: stickiness, retention, lifetime value, outliers. Stickiness is daily ÷ monthly active users, retention is measured on the starting cohort, and lifetime value is about monthly margin ÷ monthly churn.
  6. Correlation, seasonality, survivors and regression to the mean. A feature used by retained users may only mark engaged users, so an experiment is needed to show it causes retention.
  7. CUPED: shorter tests from pre-test data. CUPED subtracts from each user's metric the part predicted by their own pre-test behaviour, removing a share ρ² of the variance.

Cyber security

Think like attacker and defender: store passwords properly, tell hashing from encryption, close the classic web flaws, spot the scams aimed at banks and respond to an incident in order.

  1. Passwords, brute force and second factors. Passwords are stored with a slow, salted hash such as bcrypt or Argon2, never a fast hash like SHA-256.
  2. Hashes: salts, one-way functions and checksums. A per-user salt makes 2 identical passwords hash differently and defeats precomputed tables.
  3. Encryption, TLS, certificates and keys. TLS uses public-key cryptography only to agree on a shared key, then a fast symmetric cipher such as AES.
  4. Web flaws: injection, XSS, CSRF and access control. Parameterised queries send input as data so it cannot become SQL, and encoding output stops stored XSS.
  5. How attackers go after banks. A message from 'IT' with a look-alike link is reported and the real address typed by hand.
  6. Defence: privilege, zero trust, patching, detection and response. Each account gets only the rights it needs, and zero trust checks identity and device on every request wherever it comes from.
  7. How a slow hash turns hours of cracking into years. The time to try every password is the search space divided by the guesses a second the hash allows.

Digital design and FPGAs

Reason about hardware the way trading-latency teams do: bits and fixed point, logic and registers, clock limits and pipelines, signals crossing clock domains, and when an FPGA beats a CPU.

  1. Binary arithmetic: two's complement, fixed point, bits and ECC. In two's complement a negative number is read by inverting the bits and adding 1, and n bits cover −2n−1 to 2n−1 − 1.
  2. Boolean logic and state machines. Boolean expressions simplify by factoring, so A·B + A·B' = A, and NAND alone can build any gate.
  3. Registers in Verilog: assignments, latches and loops. In a clocked Verilog block, registers use non-blocking <=, which reads all old values before updating them together, so a <= b; b <= a swaps them.
  4. Clock limits, pipelining, power and bandwidth. The clock period must cover the longest path between registers plus setup and clock-to-output times.
  5. Crossing clock domains and releasing resets. A signal from another clock domain can make a register metastable, so a single bit passes through a two-flop synchroniser.
  6. FPGAs: look-up tables, ASICs and trading. An FPGA builds logic from look-up tables, each a small memory whose 2k bits hold the truth table of any k-input function.
  7. How wide an accumulator must be. A product of an a-bit and a b-bit number needs a + b bits, and a sum of N values adds log₂ N bits, rounded up.

Statistics and machine learning

The statistics quant interviews lean on: regression and its traps, correlation, what significance does and does not mean, normal tails, return arithmetic and the basics of model fitting.

  1. Regression and its traps. The OLS slope of y on x is the correlation times σy divided by σx, and with one regressor R² is the squared correlation.
  2. Correlation, variance of sums and spurious links. The variance of a sum adds the variances and twice the covariance, and correlations of trending price levels are often spurious, so correlate returns.
  3. Significance, errors and intervals. A p-value is the probability of data at least this extreme if the null hypothesis is true, and a mean's standard error is σ ÷ √n.
  4. Normal quantiles, skewness and fat tails. For a normal variable about 68.3% lies within 1 standard deviation and 95.4% within 2, and 1.645 is the one-sided 5% quantile.
  5. Return arithmetic and robust statistics. A Sharpe ratio scales with the square root of time, because mean returns grow with time and volatility with its root.
  6. Fitting models: overfitting, regularisation, metrics. A model that fits training data far better than new data has overfitted, and Lasso can set coefficients to zero while ridge only shrinks them.
  7. The Sharpe ratio luck alone would find. A Sharpe ratio estimated over T years has a standard error of about the square root of 1 ÷ T for a true Sharpe near zero.

Machine learning for finance

Build models that survive real markets: catch overfitting and leakage, validate in time, use trees and boosting well, judge rare-event models with the right metrics and watch for drift.

  1. Overfitting and how to fight it. A model far better in sample than out of sample has learned noise, so keep a test set never used for any decision.
  2. Leakage and validation in time. Leakage lets information from the test period or the outcome reach the model, so every feature must be known before the prediction time.
  3. Random forests and boosting. A random forest averages deep trees grown on bootstrap samples with random feature subsets, while gradient boosting adds shallow trees fitting the errors so far.
  4. Rare events and the right metrics. On imbalanced data accuracy misleads, so a rare-event model is judged on precision, recall and AUC.
  5. Distances, explanations and drift. Distance-based methods such as k-nearest neighbours and k-means need standardised features and suffer in high dimensions, where points become roughly equally far apart.
  6. Why more trees stop helping: the correlation floor. The variance of an average of B trees with variance σ² and pairwise correlation ρ is ρσ² + (1 − ρ)σ² ÷ B.

System design

Size a system on the back of an envelope, then make it fast with caches, reliable with replicas and safe with retries, and explain each trade-off the way design interviews expect.

  1. Back-of-the-envelope sizing. Size a system for its peak: daily requests ÷ 86,400 seconds × the peak factor, and storage = items a day × size × days kept × replicas.
  2. Caching: hit rates, expiry, stampedes and hashing. A cached read pays the lookup every time plus the database on each miss, and a time-to-live should match the staleness the business accepts.
  3. Replicas, consistency and availability. Replicas lag the primary, so a user's own writes are read from the primary, read-your-writes on top of eventual consistency.
  4. Retries, idempotency, queues and back-pressure. A retried payment needs an idempotency key stored by the server, and retries need exponential backoff with jitter and a circuit breaker that fails fast.
  5. Queries, storage engines, IDs and service boundaries. Fetch related rows in one query instead of N+1, and page by keyset, WHERE id > last_seen_id, not LIMIT with a growing OFFSET.
  6. Tail latency: why fan-out makes rare delays common. A request waiting on N servers each slow 1% of the time is slow with probability 1 − 0.99N.

Deep learning and LLMs

Count parameters and memory in your head, explain what tokens, attention and caches cost, and build LLM features that are grounded, tested and safe to put in front of clients.

  1. Parameters, softmax and cross-entropy. A dense layer has inputs × outputs weights plus one bias per output, and softmax turns logits into probabilities with ez ÷ Σez.
  2. Training deep networks that learn. Sigmoid derivatives of at most 0.25 shrink gradients layer after layer, which ReLU, residual connections and normalisation prevent.
  3. Memory: weights, training, experts and caches. Weights take parameters × bytes per parameter, 2 bytes in 16-bit and half a byte in 4-bit.
  4. Tokens, attention, temperature and word order. LLMs are billed and limited in tokens, about 0.75 English words each, and self-attention's cost grows with the square of the context length.
  5. Retrieval, embeddings and vector search. Retrieval-augmented generation answers from retrieved source text, which cuts invented facts, and a few sharp passages beat many pages.
  6. Shipping LLM features: alignment, evaluation and safety. Preference training such as RLHF aligns behaviour after pretraining, and text inside data can carry prompt injection and must not steer actions.
  7. The key-value cache: why serving runs out of memory. A transformer keeps a key and a value per past token in each layer, 2 × layers × hidden size × bytes per number.

Data engineering

Design pipelines that load once, scan little and never lie: warehouse models, columnar files, partitions, Spark joins, late events in streams, and tests that catch a half-empty table.

  1. Modelling the warehouse: facts, dimensions and history. In a star schema each fact row is a measured event, such as a sale line, holding keys to its dimensions and its amounts.
  2. Lakes, warehouses, columnar files and change capture. Raw data sits cheaply in a lake on object storage, while curated tables live in a warehouse for fast SQL.
  3. Spark: lazy plans, skew and broadcast joins. Spark transformations only build a plan until an action such as count, write or collect runs it.
  4. Partitions, idempotent loads, small files and backfills. A partitioned table prunes only on its partition key, so a filter on user_id alone scans every date partition.
  5. Streams: latency, consumers, delivery and late events. A Kafka partition goes to one consumer of a group, so consumers beyond the partition count sit idle.
  6. Data quality, scheduling, throughput, time zones and deletion. Volume and anomaly tests catch silent partial loads, and uniqueness tests catch rows doubled by a join.
  7. Choosing a watermark: completeness against delay. A watermark closes an event-time window: waiting longer counts more late events but delays every result.

Cloud and infrastructure

Run services that stay up and stay affordable: containers and probes, canary and blue-green releases, zones and recovery targets, the networking basics, and cloud bills worked out before they arrive.

  1. Availability targets, error budgets and observability. An availability target allows (1 − target) × the minutes in the period of downtime, and an error budget used up early shifts SRE effort to reliability.
  2. Containers, probes, autoscaling and limits. A container starts in seconds because it shares the host's kernel, and a readiness probe holds traffic until a pod is ready.
  3. Canary and blue-green releases, code and secrets. A canary release sends a small share of traffic to the new version and widens step by step while errors stay low.
  4. Zones, recovery targets, distance and scaling out. Replicas across availability zones survive the loss of one data centre, and an untested recovery plan is likely to fail.
  5. Networking basics: layers, DNS, subnets and UDP. Routing by URL path needs a layer 7 HTTP load balancer, since a layer 4 one sees only addresses and ports.
  6. Storage choices and cloud costs. Millions of files served over HTTP belong in object storage such as S3, and data sent out of the cloud is billed per GB.
  7. Buying capacity in layers: commit the base, scale the peak. Capacity should be bought in layers: commit at a discount for the all-day base load and autoscale on-demand instances for the peaks.

Python for data

Read NumPy and pandas code the way a desk quant does: views and copies, axes and broadcasting, NaN everywhere, joins that add rows, and backtests that do not peek at tomorrow.

  1. NumPy: views, axes, broadcasting and masks. A NumPy slice is a view, so changing it changes the original unless you call .copy(), while a list slice is a copy.
  2. NaN: missing values that spread. NaN is a float that equals nothing, itself included, so test it with np.isnan or pd.isna.
  3. pandas indexing and assignment. Select and assign in a single .loc call, df.loc[df.a > 0, 'b'] = 1, because chained indexing writes into a temporary copy.
  4. Merges, counts and speed. A left merge repeats each left row once per matching right row, so duplicate right keys add rows.
  5. Time series in pandas: returns, windows and dates. Shift a signal with .shift(1) before multiplying by returns, and compound returns with (1 + r).cumprod().
  6. Python traps that come up with data. Python's // rounds towards minus infinity and % takes the divisor's sign, while == compares values and is compares identity.
  7. Why NumPy is fast: memory layout. A NumPy float64 array stores each number in 8 contiguous bytes, while a Python list stores an 8-byte pointer to a separate 24-byte float object.

Computer architecture and GPUs

Explain where the nanoseconds go: CPU time and pipelines, caches and memory layout, Amdahl's law and the traps of threads, power limits, and why GPUs win some workloads and starve on others.

  1. CPU time, pipelines, branches and out-of-order execution. CPU time = instructions × cycles per instruction ÷ frequency, and mispredictions add branch share × mispredict rate × penalty to the CPI.
  2. Power, clock speed and transistor counts. Dynamic power scales with capacitance × voltage² × frequency, so lowering voltage and frequency together saves power steeply.
  3. Caches, memory layout and the memory hierarchy. Average access time = hit time + miss rate × miss penalty, and a working set that fits in cache runs far faster.
  4. Parallel speedup, false sharing, NUMA and SIMD. Amdahl's law gives a speedup of 1/(s + p ÷ n) for serial share s, parallel share p and n cores, never above 1/s.
  5. GPUs: arithmetic intensity, divergence and training memory. A GPU runs thousands of simple cores in parallel, and a kernel with little arithmetic per byte is memory-bound at bandwidth × intensity.
  6. The roofline: memory-bound or compute-bound. A kernel's attainable speed is the lower of the chip's peak arithmetic rate and its memory bandwidth times the kernel's arithmetic intensity.

Technology in banks and trading

Speak the language of bank tech teams: latency budgets and colocation, trading engines and their safety nets, uptime and change control, core systems, and the EU rules every bank engineer works under.

  1. Latency budgets, colocation, fibre and microwave. A trading edge is a time budget that processing and network must fit, and light in fibre travels about 200,000 km a second.
  2. Inside a low-latency engine. A low-latency engine preallocates memory, because allocation on the critical path can take locks or fault pages.
  3. Orders, safety nets and the road to production. Orders travel in FIX messages, and a market order larger than the best level walks the book at a volume-weighted price.
  4. Uptime, change control and migrations. Each extra nine of uptime cuts allowed downtime tenfold, and production changes need review, tests, approval and a rollback plan even when small.
  5. Core systems: mainframes, batches, messages and grids. Core ledgers stay on mainframes for reliability and because migrating decades of logic is costly and risky.
  6. EU rules bank engineers work under. Under PSD2 banks open account APIs to licensed providers with explicit customer consent, while DORA covers ICT risk, incidents, resilience testing and critical tech suppliers.
  7. Why latency explodes near full load. In a random queue, the average time in the system is the service time divided by (1 − utilisation), so latency doubles at 50% load.

Payments and fintech

Understand how payments make money and where they break: the card chain, interchange caps and take rates, chargebacks and approval rates, PSD2 and instant payments, and fintech unit economics.

  1. The card chain: issuers, acquirers, networks and fraud. The issuer is the cardholder's bank and the acquirer the merchant's, linked by a network such as Visa or Mastercard.
  2. Interchange caps, acquirer margins and take rates. EU rules cap consumer interchange at 0.2% for debit and 0.3% for credit cards.
  3. Merchants: chargebacks, approval rates, facilitators and KYB. In a chargeback the merchant bears the loss unless it proves the sale, and high chargeback ratios bring network fines.
  4. PSD2, e-money and instant payments. PSD2 requires strong customer authentication with at least 2 independent factors from knowledge, possession and inherence.
  5. Fintech models: BNPL, neobanks, embedded finance and float. A buy-now-pay-later provider earns mostly merchant fees, minus credit losses and funding.
  6. Fraud caught against good customers declined. A fraud model should decline a payment when the expected fraud loss exceeds the margin expected if the payment is good.

Crypto and digital assets

Trade crypto like a markets desk: perpetual funding and the basis, how blockchains and stablecoins hold up, DeFi pools and their risks, custody, and the EU's MiCA rules.

  1. Perpetual futures, funding and leverage. A perpetual future has no expiry and is kept close to spot by funding paid between longs and shorts, usually every 8 hours.
  2. Basis trades and cross-venue arbitrage. When a dated bitcoin future trades above spot, buying spot and selling the future earns the basis, annualised by the time to expiry.
  3. How blockchains work: consensus, supply and fees. Proof of work secures a blockchain with computing power and proof of stake with locked tokens, and on-chain transactions are pseudonymous, not anonymous.
  4. Stablecoins and their peg. A fiat-backed stablecoin holds its peg because holders trust they can redeem it at par, so arbitrageurs buy it below par and redeem it.
  5. DeFi: pools, lending, oracles and staking. An automated market maker (AMM) keeps the product of its 2 reserves constant, x × y = k, so each trade moves its price.
  6. Custody, exchanges and proof of reserves. Whoever controls the keys controls the assets, so institutions use qualified custodians that keep most coins offline in cold wallets.
  7. Token supply and EU regulation. A token's fully diluted valuation counts every token that will ever exist at today's price, while its market capitalisation counts those in circulation.
  8. Collecting funding: a hedged trade that is not riskless. Holding spot and shorting the perpetual collects the funding without price risk, so its yield is the funding rate annualised, 3 payments a day.

Say them out loud

The technical round of the video interview practice asks 5 questions on your desk, 90 seconds each, and reviews every answer. Each guide ends with a timed quiz.

Every topic comes from the Academy guides of this desk. Updated .