Questions
The senior ML interview canon
191 questions across 9 categories. Each with what L4 / L5 / L6 answers actually sound like, the tells that get a strong-hire vote, and the tells that get you down-leveled. Press / to search.
ML Fundamentals 8
- Bayesian vs frequentist: a practitioner's framing
The textbook distinction is philosophical. The practitioner distinction is whether you can sample from a posterior cheaply, and whether you need uncertainty for downstream decisions.
- Explain backprop in your own words
Backprop is reverse-mode automatic differentiation. It reuses forward-pass values to compute all parameter gradients at roughly one additional forward-pass cost.
- How do you choose a learning rate?
Check update stability, propose a learning-rate peak, then test its schedule from a clean starting state.
- How do you choose a loss function?
Choose a loss from the target, noise model, error cost, and output constraints. A well-trained model still fails when its objective is wrong.
- L1 versus L2: derive the zero coefficient
Solve a common quadratic under absolute and squared penalties, test the zero subgradient condition, and separate objective sparsity from solver behavior.
- Walk me through the bias-variance tradeoff
The classic warm-up question. The L4 answer is the formula; the L6 answer is what it tells you about model selection in production.
- When would you not use cross-validation?
Cross-validation is a tool, not a default. The senior answer names the cases where it's wrong, expensive, or misleading.
- Why does dropout work?
The trick is that there are three valid explanations and they all matter. Which ones you reach for tells the interviewer your level.
Math & Research 7
- Critique an ML paper you have not seen before
A research-depth framework for claims, baselines, evidence, leakage, compute fairness, ablations, and generalization.
- Defend an ML derivation when its assumptions change
A strong derivation states assumptions, exposes the key identity, checks the result, and explains what it means for model behavior.
- Derive logistic regression from MLE
Standard math-screen question. The senior signal is whether you can derive it cleanly and connect MLE to cross-entropy.
- Design an ablation study that tests the claimed mechanism
Separate a model improvement from extra compute, data, parameters, tuning, and implementation confounds.
- Explain the reparameterization trick
Differentiate a smooth parameterized sample path with fixed base noise, then distinguish its gradient estimate from the expectation gradient.
- Investigate a black-box model behavior in 90 minutes
Turn an observation into competing hypotheses, discriminating probes, boundary conditions, and one decision-changing result.
- Why is softmax + cross-entropy the right pairing?
The gradient simplifies to (p - y), and that's not a coincidence. The senior answer derives this and connects to GLMs and numerical stability.
ML Implementation 13
- Debug a frontier LLM training run that suddenly diverges
A loss spike is an incident: preserve evidence, classify the failure, isolate the first bad transition, and recover without hiding the cause.
- Debug this training loop
Trace gradient buffers and module mode, separate demonstrated defects from missing contracts, then execute a corrected CPU training fixture.
- Extend an unfamiliar ML codebase with an AI coding agent
The new coding signal is control: map the system, delegate bounded work, reject bad changes, and prove the result.
- Implement a LoRA adapter for a frozen linear layer
The code is small; the signal is low-rank parameterization, zero-impact initialization, scaling, trainable-state control, and deployment trade-offs.
- Implement a pre-norm Transformer decoder block
The code tests tensor contracts, causal masking, stable attention, residual structure, and whether you can connect a toy block to production kernels.
- Implement attention from scratch
The coding question that doubles as a depth check. The code is short; the conversation around it tells the level.
- Implement beam search with EOS and length normalization
The implementation tests bounded hypothesis state, log-probability accounting, finished-sequence handling, and whether the decoder fits the task.
- Implement incremental decoding with a KV cache
Prove that one-token cached attention matches full-prefix attention while preserving shape, dtype, growth, and memory invariants.
- Implement KNN efficiently
The naive solution is one line. The interview is about scaling: when does naive fail, and what do you do?
- Implement memory-bounded batched top-k retrieval
Retrieve top-k cosine neighbors for many queries without materializing the full query-by-item score matrix.
- Implement mergeable streaming classification metrics
Build a bounded-memory confusion-matrix accumulator with merge, precision, recall, F1, and edge-case handling.
- Implement reverse-mode autodiff for scalar expressions
Build the computation graph, local derivatives, gradient accumulation, and reverse topological pass behind neural-network training.
- Optimize an accelerator workload from a trace
Performance engineering is a measured argument: identify the bottleneck, predict the effect, preserve correctness, and shorten the critical path.
ML System Design 11
- Design a content moderation system
Moderation is a multi-policy classification problem at scale, with appeals, human review, and adversarial users. The senior answer separates policy from model and treats human review as part of the system.
- Design a feature store from scratch
A feature store solves training-serving skew, feature reuse, and lineage. The senior answer explains why each property matters and what minimum viable looks like.
- Design a foundation-model data platform
A deep case on lawful sourcing, provenance, curation, contamination, mixtures, high-throughput processing, deletion, release gates, incidents, and multi-level technical judgment.
- Design a multi-team ML platform
A staff-level case covering platform scope, data contracts, training, deployment, governance, migration, ownership, cost, and adoption across product teams.
- Design a production LLM inference service
Turn prefill, decode, KV memory, admission, batching, fairness, overload, and cost into one explicit serving policy.
- Design a real-time multimodal assistant
A deep system-design case covering synchronized live media, streaming models, latency, failure recovery, privacy, evaluation, rollout, incidents, and multi-level technical decisions.
- Design an ML system under a fixed serving budget
A cost-constrained system-design question where quality, latency, traffic, and annual spend must fit one defensible operating point.
- Design fault-tolerant distributed training
Classify fail-stop, straggler, state-divergence, and silent-corruption failures before choosing restart, elasticity, redundancy, or repair.
- Design fraud detection for a payment company
Design payment-risk decisions while preserving action, label maturity, audit provenance, point-in-time features and the costs of mistakes.
- Design ML monitoring
Separate service health, input contracts, model behavior, mature outcomes and causal comparisons; attach each alert to evidence and an owner.
- Design real-time personalization
Real-time personalization fails most often at the data infrastructure, not the model. The senior answer designs the feature freshness and serving stack first.
Product & Experimentation 4
- Choose metrics for an ML product
Define metric populations, horizons and decision roles, then apply a joint release rule without overriding its guardrails.
- Design an A/B test for a new ML model
Turn an offline model gain into a valid product decision: unit, exposure, power, guardrails, interference, and a ship rule.
- How do you A/B test a chatbot?
Chatbot A/B testing has all the hard parts of regular A/B testing plus delayed feedback, conversational state, and metrics that are hard to define.
- Your offline metric improved but the online metric got worse. Debug it.
Separate experiment validity, delivered treatment and product outcomes before attributing an online regression to the model.
Deep Learning Production 8
- Explain backprop through time
BPTT is just backprop on the unrolled computation graph of a recurrent network. The interview signal is whether you understand truncation and what it costs.
- How do you deal with class imbalance in 2026?
Match the treatment to the imbalance ratio, error costs, label process, and decision metric. Class weighting and SMOTE are only two options.
- How would you debug a model that's not learning?
Isolate loss, gradient, and parameter-update failures with a reproducible batch before escalating to optimization or task mismatch.
- Mixed precision: what's actually happening?
Beyond 'use BF16'. The senior answer explains what stays in FP32, why loss scaling exists for FP16, and the memory split.
- Plan and cost a 70B transformer training run
Turn a model configuration and cluster budget into parameters, memory, parallelism, time, and an experiment plan.
- Train and serve a reasoning model under a fixed compute budget
A deep system-design case on allocating fixed accelerator capacity across reasoning-model training, verification, evaluation, routing, serving, reliability, and organizational ownership.
- Walk me through how you'd train a 100B parameter model
The question is about parallelism and memory, not about modeling. The L6 answer combines data, tensor, pipeline, and FSDP/ZeRO sharding into a coherent strategy.
- Why does Adam sometimes generalize worse than SGD?
Separate measured optimizer performance from coordinate-dependent sharpness, decay coupling and unequal tuning or resource budgets.
LLM Systems 16
- Build an LLM coding assistant from scratch
Bind inline suggestions to editor state, retrieve authorized context, discard stale responses and verify a separate tool-enabled task workflow.
- Design a RAG system for legal documents
Legal RAG amplifies every standard RAG concern: precise citations, no hallucinations, regulated domain, dense documents with structure. The senior answer addresses each.
- Design a safety control plane for high-impact agents
A deep case on independent runtime controls, safety cases, monitors, circuit breakers, approval, evidence, degraded operation, incidents, evaluation, and upper-IC judgment.
- Design a system for safe LLM deployment in healthcare
Design a bounded record-summary workflow around patient identity, encounter dates, source evidence, clinician authority and controlled changes.
- Design an AI coding product
A deep system-design case covering four coding modes, repository context, safe execution, evaluation, developer control, rollout, cost, and organization-wide technical decisions.
- Design an enterprise agent platform
A deep architecture case covering delegated authority, tool contracts, durable state, safe retries, memory, evaluation, observability, rollout, cost, and multi-organization governance.
- Design an LLM red-team and security evaluation program
Start from assets and attacker capability, test the whole agentic system adaptively, and turn findings into measurable release gates.
- Design post-training data, an RL environment, and its grader
Turn one capability into episodes, evidence-bearing graders, adversarial data, and a training signal that cannot reward the wrong process.
- Fine-tuning vs prompting: the deep version
Past the basic decision tree. The senior answer covers SFT, LoRA, DPO, continued pretraining, and the operational trade-offs each introduces.
- How do you evaluate an agent?
Agent eval is harder than chat eval because there are intermediate steps, tool calls, and long-horizon outcomes. The senior answer evaluates trajectories, not just final outputs.
- How do you handle hallucinations in production?
There is no single solution. The senior answer is a layered system that catches different hallucination types at different stages.
- How would you build evals for a coding assistant?
Code is one of the few LLM domains where ground truth is verifiable. Use that. The senior answer combines verifiable metrics with human review for what verification can't catch.
- How would you evaluate an LLM application you've built?
Define task success, combine hard checks with supported-answer review, and make an evidence-limited release decision.
- How would you reduce LLM inference cost by 10x?
The cost-engineering question. The L6 answer doesn't pick a technique, it diagnoses where the cost is, then picks five.
- Walk me through speculative decoding
The interview signal is whether you understand why decoding is memory-bound and why the verify pass is essentially free.
- When would you fine-tune vs prompt vs RAG?
Locate a failed requirement, test the suspected cause and compare prompts, retrieval, training or a simpler implementation.
Recsys & Search 9
- Design a complementary purchase shelf
Distinguish complements from similarity, compare co-purchase rates with lift, and separate attributed orders from useful incremental purchases.
- Design short-form video recommendation for ecosystem health
A deep recommendation case balancing viewer value, creator opportunity, quality, revenue, concentration, experimentation, operations, and portfolio choices across a short-form video ecosystem.
- Design Spotify's homepage
Compose coherent music shelves under page-level utility, repetition, editorial, freshness and privacy constraints rather than sorting unrelated local scores.
- Design YouTube's recommender
Scope a video recommendation surface, compare conditional objectives, trace candidate coverage and preserve exposure before learning from feedback.
- How would you do cold-start for a new user?
Use permitted context, item content, optional preferences and bounded exploration while measuring feedback uncertainty and whole-cohort outcomes.
- How would you evaluate a search ranker?
Evaluate a search ranker with judged queries, explicit averaging weights, exposure controls, slice guardrails and a recorded release decision.
- Negative sampling strategies: what actually matters
Choice of negatives often matters more than choice of model. The senior answer ranks the strategies (in-batch, hard, BM25-mined, model-mined) and explains the trade-offs.
- Two-tower vs cross-encoder: when to use which?
The recsys / search architecture decision that comes up in every retrieval interview. The right answer is 'both, in sequence.'
- Where an LLM belongs in a recommender
Choose a changed task, budget optional inference, compare simpler baselines and validate generated recommendations against the current catalog.
Behavioral 9
- Defend a values decision under ethical pressure
Explain a real values decision using prior evidence, competing concerns, obligations, ownership and observed outcomes without rewriting the record.
- How do you decide what to work on?
Compare feasible portfolios against their next-best alternative, protect mandatory obligations and explain a real chosen-versus-declined decision.
- How do you scope an ambiguous problem?
Scoping is a core senior skill. The interview tests how you reduce ambiguity before choosing a model or system design.
- Present a technical ML project and defend it under questions
Present owned decisions with credible alternatives, prior evidence, technical depth and honest outcome limits, even when questions change the order.
- Tell me about a time you advocated for quality or safety over speed
A senior behavioral question about evidence, proportionate pushback, stakeholder pressure, and responsible trade-offs.
- Tell me about a time you disagreed with someone senior
The standard behavioral question. The interviewer is checking whether you can hold technical positions, push back productively, and update on new information.
- Tell me about an ML project you killed or redirected
A staff-level behavioral and project question about sunk costs, evidence thresholds, influence, and responsible stopping.
- Tell me about your most ambitious project
The interview is checking the size of problem you can hold in your head and the structure of how you describe it. Specificity wins.
- What's the most over-rated technique in ML right now?
Critique a specific technical use with task evidence, cost, uncertainty and a useful boundary; state what would change the recommendation.
Other
- 3Sum
Return every unique group of three numbers whose sum is zero.
- Add parse counts only for valid final tokens
Separate one-digit and two-digit decoding choices, preserve both rolling dependencies, then enumerate witnesses or change the token vocabulary.
- Allocate one copy per original identity before following edges
Memoize copies before discovery, then preserve every ordered adjacency entry across cycles, shared nodes and multiple roots.
- Attach the smaller sorted frontier and advance only its source
Prove two-frontier sufficiency, preserve node identity while rewiring, then copy the output or change both source and comparison order.
- Balanced Binary Tree
Return a certified subtree height or failure, propagate failure before combining, and distinguish local height from whole-tree balance.
- Best Time to Buy and Sell Stock
Summarize the cheapest eligible baseline for each sale, preserve optional profit, and change update timing for witnesses and mandatory trades.
- Binary Precision and Recall
Compute precision and recall from binary labels and predictions.
- Binary Search
Find a target in a sorted array.
- Binary Tree Maximum Path Sum
Return one extendable branch, score two branches locally, and keep nonempty path sums distinct from height or diameter.
- Branch at wildcards and require an exact terminal match
Follow trie edges for literals, explore character alternatives at each dot, then change existence into counting or iterative matching.
- Causal Attention
Compute one attention head where each token can read only itself and earlier tokens.
- Combination Sum
Combine same-index reuse with a nondecreasing choice boundary and positive remaining-target decrease, then switch to finite occurrences or count-only DP.
- Combination Sum IV
Partition ordered sequences by their final value, distinguish total-first from denomination-first counting, and add a length bound before allowing nonpositive values.
- Compare aligned values and missing-child positions together
Match values and corresponding child positions, then change alignment or ignore labels explicitly.
- Compare skipping the current item with its last compatible prefix
Name the two prefix optima, derive skip versus take, then change endpoint conflicts or recover selected indices.
- Compress all reachable forward choices into one prefix boundary
Use maximum-jump prefix reachability, reject gaps before expansion, then change the destination or count minimum layers.
- Construct Tree From Preorder and Inorder Traversal
Consume preorder roots within exact inorder ranges, build children in the required order, and validate compatibility rather than only matching value sets.
- Container With Most Water
Pick two heights that hold the most water.
- Contains Duplicate
Compare input and distinct cardinalities, preserve complete set construction, and retain positions only when duplicate distance matters.
- Count disjoint final-move cases and retain only their dependencies
Derive rolling path counts from final-move cases, then change valid landings or allowed positive jumps.
- Count new component seeds and mark each whole region
Erase land on discovery so each component has one counted seed, then change ownership or reduce component area.
- Count Number of Nice Subarrays
Count subarrays that contain exactly `k` odd numbers.
- Counting Bits
Reuse a smaller integer's completed population count instead of recounting every binary representation.
- Course Schedule II
Save the zero-indegree emission order, reject blocked prefixes, and distinguish any valid witness from lexicographic priority and independent verification.
- Cross-Entropy From Logits
Compute mean multiclass cross-entropy from logits and integer labels.
- Daily Temperatures
For each day, find how many days pass before a warmer temperature.
- Decode String
Decode text such as `3[a2[c]]` into `accaccacc`.
- Define two-prefix answers before compressing the table to rows
Derive matching and skipping dependencies, preserve old-row values, then change storage orientation or recover a subsequence.
- Detect a cycle with one-link and two-link moves
Follow actual node identities, prove the relative-offset collision, then recover the cycle entry and length without changing links.
- Edit Distance
Price each final insertion, deletion or replacement from its smaller prefix state, retain two rows, and adapt operation costs or eligibility.
- Encode and Decode Strings
Frame payloads with lengths, preserve empty and hash-containing strings, and distinguish trusted character decoding from validated and byte-counted formats.
- Extend a snapshot of reachable sums to use each occurrence once
Separate old sums from new additions, then change to dense coordinates or signed inputs without silently permitting reuse.
- Finalize the cheapest pending path under nonnegative edge costs
Accept a node's first cheapest heap entry, skip later duplicates, then change sources or arrival queries.
- Find Median From Data Stream
Maintain ordered lower and upper heaps at completed insertions, distinguish repair states, and adapt float medians to exact fractions or nearest-rank quantiles.
- Find Minimum in Rotated Sorted Array
Retain a minimum inside an inclusive candidate interval, keep a possible midpoint answer, and handle duplicate ambiguity without false logarithmic guarantees.
- Freeze the current frontier before adding the next level
Capture one queue boundary, preserve depth order, then select or reduce each complete level.
- Graph Valid Tree
Combine an exact edge count with full undirected reachability, then adapt the proof for forests or an explicit labeled vertex universe.
- Group Anagrams
Use complete character counts as immutable bucket keys, preserve duplicates and input order, and change the alphabet or returned evidence explicitly.
- House Robber II
Cover every circularly valid selection with two endpoint-excluding lines, then avoid slices or reconstruct a nonadjacent original-index witness.
- Infer only forced character precedences, then order the graph
Use adjacent words' first differences, reject invalid prefixes and cycles, then report ambiguity or validate a proposed alphabet.
- Insert Interval
Insert one range into sorted, non-overlapping ranges and merge when needed.
- Join direct key lookup to a doubly linked recency order
Trace promotion and eviction, keep the map and linked order consistent, then observe without refreshing or shrink entry capacity.
- Keep a link gap until the leading pointer reaches the tail
Locate the predecessor of an end-relative target, preserve invalid-rank behavior, then switch to read-only lookup or front-index removal.
- Keep the best k values with the weakest retained value at the root
Evict the smallest retained occurrence on overflow, then change distinctness or report streaming thresholds.
- Keep the earliest finishing compatible range to preserve future room
Prove maximum compatible cardinality by exchange, then request a witness or change to weighted interval selection.
- Koko Eating Bananas
Find the slowest eating speed that finishes all piles within the time limit.
- Kth Smallest Element in a BST
Use inorder as a sorted stream, count pops rather than descent, and add subtree counts only when repeated rank queries justify them.
- Largest Rectangle in Histogram
Find the largest rectangle that fits under histogram bars.
- Launch words only from completely segmentable prefixes
Treat text boundaries as reachable states, reject partial coverage, then reconstruct one segmentation or count distinct parses.
- Longest Consecutive Sequence
Find the length of the longest run of consecutive values in an unsorted array.
- Longest Increasing Path in a Matrix
Use strict value growth to justify a coordinate-only suffix cache, then change evaluation order to avoid recursion or count all increasing paths.
- Longest Increasing Subsequence
Keep the smallest ending value for each achieved length, then recover a witness only when the task requires one.
- Longest Palindromic Substring
Expand matching endpoints around character and gap centers, retain the first longest range, and adapt the result to ties or repeated interval queries.
- Longest Repeating Character Replacement
Replace at most `k` letters so the longest possible substring has one repeated letter.
- Longest Substring Without Repeating Characters
Find the longest substring with no repeated character.
- Lowest Common Ancestor in a BST
Follow both BST targets together until their routes split, state the membership precondition, and add presence evidence when ordering or membership changes.
- Maximum Product Subarray
Keep both ending-product extremes because a negative multiplier reverses which one can win.
- Maximum Subarray
Separate the best sum ending at the cursor from the best nonempty range found anywhere.
- Meeting Rooms: Make Every Conflict an Adjacent Boundary
Sort positive-length meetings, check neighboring boundaries, then adapt the endpoint and turnaround rules.
- Merge K Sorted Lists
Merge many sorted linked lists into one sorted list.
- Min Stack
Build a stack that returns its current minimum in constant time.
- Mini-Batches
Split examples into batches without dropping the final short batch.
- Minimum Window Substring
Track missing copies, save each valid cover before destructive shrinking, and adapt to required-only counters or counting every covering range.
- Missing Number
Cancel expected and observed integer values under an exact one-omission contract, then change validation or omission count.
- Number of 1 Bits
Clear the lowest remaining one at each step, with an explicit nonnegative or fixed-width integer contract.
- Number of Connected Components
Launch one flood per uncovered undirected component, retain isolated vertices, and reuse the component sizes to count unreachable pairs.
- Own visited cells only for the current word path
Trace a board path, restore cells after success or failure, then support arbitrary characters or count every coordinate path.
- Pad Variable-Length Sequences
Put integer sequences into one rectangular array and return a valid-token mask.
- Pairwise Squared Distances
Compute the squared distance from every point to every center without Python loops.
- Palindromic Substrings
Count each accepted center radius as a separate index range, then distinguish occurrence lists from unique palindrome text values.
- Permutation in String
Check whether any substring has the same letter counts as the pattern.
- Permutations
Choose unused input positions, restore both path and flags between branches, and distinguish partial orderings from unique repeated-value permutations.
- Product of Array Except Self
For each position, return the product of all other values. Do not use division.
- Reject an undirected edge whose endpoints already share a component
Separate graph paths from representative pointers, then change sparse labels or count remaining components.
- Release a dependency only when its unmet-requirement count reaches zero
Remove eligible prerequisite vertices, account for every outgoing edge, and distinguish blocked residual nodes from actual cycle members.
- Remove the final coin and reuse the best smaller total
Solve amount-indexed minimum counts, justify the unreachable sentinel, then recover an optimal witness or minimize unequal costs.
- Reorder List
Change `1, 2, 3, 4, 5` into `1, 5, 2, 4, 3`.
- Return one subtree height after both children
Combine child heights for a longest path, then change execution depth or count every node.
- Return transformed child roots, then reconnect them locally
Mirror every subtree while preserving node identities, then change execution or return a separate copy.
- Reverse Bits
Consume and append exactly the declared number of bits, including zero positions after the remaining input becomes zero.
- Reverse the edges when many starts share a few goals
Search uphill from each destination border, keep separate reachability certificates, and intersect them.
- Rotate Image
Rotate a square matrix 90 degrees clockwise in place.
- Rotting Oranges
Seed all simultaneous sources before FIFO spreading, mark fresh cells on enqueue, and distinguish scheduled arrival, input mutation and unreachable fresh cells.
- Save each increasing-index choice path, then undo the last choice
Copy each answer before extending a shared path, then change output length or duplicate-value policy.
- Save the remaining chain before reversing the current link
Maintain disjoint reversed and untouched regions, preserve node identity, then copy the result or use bounded recursive control.
- Search in Rotated Sorted Array
Identify one sorted half, use exact endpoint bounds to retain a target, and handle duplicate ambiguity without promising logarithmic progress.
- Serialize and Deserialize Binary Tree
Frame every recursive child slot with a value or null token, rebuild exact topology, and distinguish trusted decoding from complete-stream validation.
- Set Matrix Zeroes
If a cell is zero, set its full row and column to zero. Change the matrix in place.
- Share prefix paths and mark complete words separately
Trace character edges, distinguish membership from prefix reachability, then delete terminal state or enumerate completions.
- Sort starts to keep only one open union component
Preserve covered points with a sorted union frontier, then change touching policy or count discrete coverage.
- Spiral Matrix
Return matrix values in spiral order.
- Split Array Largest Sum
Split an array into `k` nonempty continuous parts. Make the largest part sum as small as possible.
- Stable Softmax
Convert logits to probabilities without numeric overflow.
- Subarray Sum Equals K
Count continuous subarrays whose sum equals the target.
- Subtree of Another Tree
Locate candidate roots, verify every value and child position, and distinguish exact subtree equality from partial-pattern matching.
- Sum of Two Integers
Separate sum bits from deferred carries, preserve a finite modular sum, then decode the requested signed or unsigned result.
- Top-K Scores
Return indices of the `k` largest scores in descending score order.
- Track active end times to find peak room demand
Count simultaneous half-open meetings, prove the minimum room count, then change endpoint occupancy or return reusable room IDs.
- Traverse board paths and dictionary prefixes together
Share prefix work across words, restore board cells, consume unique outputs, then change board ownership or count occurrences.
- Two Sum
Return the indices of two numbers that add to the target.
- Unique Paths
Count disjoint final moves while one rolling row retains old-above and new-left values.
- Use bounded occurrence counts as ranking coordinates
Place distinct values at their frequency coordinates, then change memory use or specify exact cutoff ties.
- Valid Anagram
Check whether two strings contain the same letters with the same counts.
- Valid Palindrome
Repair one irrelevant endpoint at a time, preserve matched outer pairs, and distinguish per-character lowercase from normalization and one-deletion edits.
- Valid Parentheses
Check whether all brackets close in the correct order.
- Validate Binary Search Tree
Carry every ancestor's ordering constraint as an interval, reject a hidden descendant violation, and change traversal or duplicate placement deliberately.