All topics

Coding & systems

Data Structures

Hash maps, heaps, order-book structures

Overview

About data structures questions in quant interviews

Hash maps, heaps, trees, and the order-book-shaped data-structure problems quant developers face — efficiency and complexity analysis over whiteboard pattern-matching.

How to study this topic

A path that works

  1. 1

    Start with the easy set

    Warm up with the 17 easy data structures questions. Quick wins build pattern recognition before complexity ramps.

  2. 2

    Drill the medium tier next

    50 medium questions sit in the sweet spot where most interview questions cluster. Time yourself, then redo any you missed two days later.

  3. 3

    Stress-test on hard problems

    31 hard questions simulate the on-site round. Skip looking at solutions for at least 20 minutes, then write up your approach.

The library

All 98 data structures questions

easyLagged Return AutocorrelationeasySimple Moving Average with Circular BuffereasyRolling Z-Score SignaleasyValue Factor - Book-to-Market Z-ScoreeasyRolling Volume-Weighted Average PriceeasyCross-Sectional Winsorization and Z-ScoreeasyContinuous Logarithmic ReturnseasyBitfield Order FlagseasyDoubly Linked Order ListeasyTime-Bucketed Average Trade PriceeasyStatic Hash Map with Linear Probing (No Heap Allocation)easyFixed-Size Top-N Tracker with Min-HeapmediumDollar Bar ConstructionmediumCorwin-Schultz High-Low Spread EstimatormediumTime-Ordered Multimap for Event Window QueriesmediumPSD Matrix Repair via Eigenvalue ClippingmediumOracle Approximating Shrinkage (OAS) Covariance EstimatormediumFenwick Tree for Cumulative Trade Volume Range QueriesmediumRobin Hood Open-Addressing Hash MapmediumCuckoo Hash Table for O(1) Order LookupmediumLimit Order Book SidemediumCarhart Four-Factor Alpha DecompositionmediumOrder Existence with Bloom FiltermediumFama-French 3-Factor RegressionmediumInterval Overlap Query for Open Position WindowsmediumSorted Array Order Book with Best Bid/AskmediumQuality Factor Composite ScoremediumVan Emde Boas Tree: Successor Query on Tick PricesmediumCross-Sectional Momentum SignalmediumTicker Symbol Prefix TriemediumCustom Unique Pointer ImplementationmediumOrder Book Imbalance CalculationmediumSkip List for Sorted Order Book Price LevelsmediumForward Fill with LimithardB-Tree Order-4 Insert and SearchhardCompressed Bitboard for Symbol Halt FlagshardConcurrent Skip List: Insert and SearchhardHigh-Performance EMA with ScipyhardLow-Latency Flat Map (Open Addressing)hardTwo-Level Price Map Order Book Range QueryhardIntrusive Linked ListhardCount-Min Sketch for Per-Symbol Volume EstimationhardAdjusting Prices for Stock SplitshardSparse Set: O(1) OperationshardLock-Free Ring Buffer with Sequence CountershardPersistent Order Tree: Immutable Version SnapshotshardTick Imbalance BarshardRadix Tree for Order ID MappingeasyInverse Matrix DeterminanteasyInverse Matrix EigenvalueeasyBinary Search Comparisons on Sorted Price LevelseasyEigenvalues of a Projection MatrixeasyRank of Outer Product MatrixmediumMemory-Mapped Tick Data AdvantagemediumMatching Engine Data StructuremediumOLS Beta Formula Dimensional ConsistencymediumQuadratic Form of a Skew-Symmetric MatrixmediumPCA Total VariancemediumCholesky Decomposition ExistencemediumOrthogonal Matrix Singular ValuesmediumReservoir Sampling for Real-Time DatamediumLRU Cache Data StructuresmediumToken Bucket vs. Leaky BucketmediumParallel Merge Sort Time ComplexitymediumSIMD Vectorization SpeedupmediumAmortized Time Complexity of Union-FindmediumBuild Order AlgorithmmediumKahan Summation Algorithm AccuracymediumBond Price Change ApproximationmediumDV01 CalculationmediumSwap Rate vs. Par RatemediumOIS-SOFR Spread InterpretationmediumCredit Default Swap Trigger EventmediumImmunization with Duration MatchingmediumRepo Rate and FinancingmediumTIPS Principal AdjustmentmediumCurse of Dimensionality in FinancemediumBloom Filter: Trade DedupmediumConsistent Hashing Load BalancingmediumRed-Black Trees vs. B-Trees for DatabasesmediumAmortized Array DoublinghardCache-Oblivious Matrix Multiply ComplexityhardSegment Tree Range Query Time ComplexityhardFenwick Tree vs. Prefix Sum ArrayhardKaratsuba vs. Schoolbook Multiplication ComplexityhardSwaption Pricing ModelhardLock-Free Queue and Compare-And-SwaphardHyperLogLog Error EstimationhardCallable Bond ConvexityhardKMP Time ComplexityhardBootstrapping a Yield CurvehardCount-Min Sketch Estimation BiashardConvertible Bond Embedded OptionhardZ-Spread vs OAS on Callable BondshardLSM Tree vs B-Tree for Time SerieshardKey Rate Duration vs. Effective DurationhardDeterminant DerivativehardFFT Option Pricing Speedup
View all 98 data structures questions