Skip to content
tezvyn:

Top 30 Senior Interview Questions and Answers

30 multiple-choice questions on Senior, drawn from 30 bites out of the 39 tagged Senior on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    Which metric pairing best demonstrates that a design system is accelerating product delivery and justifying continued investment?

    Show the answer

    Answer: c · High product-team adoption and low design-to-code drift

    The card explicitly states that high adoption paired with low design-to-code drift correlates with faster delivery and fewer regressions, making it the strongest ROI signal. Option B is tempting because governance sounds rigorous, but the card flags manual audits as unsustainable and warns against measuring only designer adoption while ignoring engineering consumption.

    Read the full bite: What metrics measure design system success and adoption?

  2. Question 2 of 30

    Which critique of a two-year fixed roadmap best demonstrates systems thinking about engineering impact?

    Show the answer

    Answer: b · It structurally degrades execution by rewarding output over outcomes while eroding observability and increasing lock-in.

    The card defines systems thinking as connecting a fixed roadmap to technical pathologies such as feature factories, telemetry blindness, talent attrition, and technology lock-in. Option A endorses the plan, B offers only the shallow objection that requirements change, and D blames product without proposing how engineering enables adaptability.

    Read the full bite: Critique the statement that product strategy should be fixed for two years

  3. Question 3 of 30

    When publishing a TypeScript library, why might you export an interface instead of a type alias for a config object?

    Show the answer

    Answer: a · Interfaces allow consumers to safely augment the shape via declaration merging.

    Interfaces support declaration merging, allowing consumers to safely augment public library types, whereas type aliases are closed. Option D is wrong because type aliases can absolutely describe objects with methods and properties; they are not limited to primitives or unions.

    Read the full bite: Key differences: type alias vs interface for object shapes

  4. Question 4 of 30

    A team passes a user object through Layout, Header, Navigation, and finally to UserMenu. What is the strongest argument for replacing this with Context or composition?

    Show the answer

    Answer: a · Layout, Header, and Navigation are coupled to a prop they ignore, making refactors and reuse harder.

    Prop drilling is primarily a maintenance and coupling problem: intermediaries must accept and forward props they do not use, so renaming the prop or reusing those components elsewhere becomes painful. Option B is tempting but wrong because the card explicitly warns against confusing drilling with runtime performance issues like excessive re-renders.

    Read the full bite: Explain prop drilling and why it's a problem

  5. Question 5 of 30

    Which call reflects how Babel transforms the JSX <a href='/home' className='link'>Go Home</a> into React.createElement()?

    Show the answer

    Answer: b · React.createElement('a', {href: '/home', className: 'link'}, 'Go Home')

    The JSX transform emits a quoted string for lowercase host tags, places attributes in the second argument preserving className, and passes text children as the third argument, not inside props. Option A is tempting because the resulting element object has props.children, but the createElement API signature requires children as a separate argument from props.

    Read the full bite: Write the React.createElement() equivalent for this JSX

  6. Question 6 of 30

    Given val result = name?.apply { trim().length } where name is String?, what is the inferred type of result and why?

    Show the answer

    Answer: c · String? because apply always returns the original receiver object, ignoring the lambda's final value

    apply returns the context object itself, so the expression yields String?, not the lambda's Int result. Option B confuses apply with let, which returns the lambda's final value.

    Read the full bite: Compare Kotlin apply and let scope functions

  7. Question 7 of 30

    What makes a user-defined type guard unsound when its predicate claims value is User but the body only verifies value is not null?

    Show the answer

    Answer: d · TypeScript narrows the type in conditional branches while the value may still lack required User properties at runtime

    A type predicate is purely a compile-time hint; if the runtime check is too permissive, TypeScript narrows the type based on a false promise, allowing unsafe property access. Distractor B is wrong because TypeScript never mutates or coerces runtime values to satisfy a type predicate.

    Read the full bite: What is a type predicate? Write a custom type guard for User.

  8. Question 8 of 30

    When operationalizing pure epsilon-DP for a query system, why must noise scale be set to sensitivity divided by epsilon instead of a dataset-wide constant?

    Show the answer

    Answer: d · Sensitivity bounds the worst-case individual impact, and epsilon directly controls the privacy loss parameter

    Noise must scale with sensitivity because it measures how much one individual can alter the result, while epsilon quantifies the privacy-utility trade-off; a fixed constant fails because high-sensitivity queries would leak information about individuals.

    Read the full bite: Apply differential privacy to user behavior queries and explain epsilon trade-offs

  9. Question 9 of 30

    A marketing team requests a neon green outside the brand palette for a holiday banner. Which response best balances velocity and systemic consistency?

    Show the answer

    Answer: b · Expose it through a campaign-scoped override with a sunset clause, drift log entry, and scheduled cleanup ticket.

    Campaign-scoped overrides with sunset clauses and drift logs isolate the exception without mutating core tokens, keeping it greppable and truly temporary. Hardcoding the hex and merely announcing it skips technical isolation and formal governance, which virtually guarantees the exception becomes permanent technical debt.

    Read the full bite: How do you handle a one-off token exception for a campaign?

  10. Question 10 of 30

    How should you refactor an effect that needs the latest prop value inside a polling interval without listing that prop as a dependency?

    Show the answer

    Answer: b · Lift the prop value into a ref and read the ref inside the interval with an empty dependency array.

    Lifting the prop into a ref lets the interval read the latest value without re-subscribing, because refs are mutable and do not trigger re-renders. Disabling the rule and reading the prop directly hides the stale closure from the linter and leaves the code vulnerable to refactor hazards.

    Read the full bite: Why is exhaustive-deps critical and when can you disable it?

  11. Question 11 of 30

    After establishing a baseline for a build time regression, what is the most effective next step before applying optimizations?

    Show the answer

    Answer: b · Decompose the pipeline into discrete stages and measure each stage's wall-clock time

    The card stresses measuring each stage to find the actual bottleneck before applying optimizations. A applies parallelism prematurely, B suggests a wasteful platform migration without diagnosis, and D targets micro-optimizations instead of structural issues.

    Read the full bite: Your build times increased significantly. How do you investigate and optimize?

  12. Question 12 of 30

    Which approach is the idiomatic TypeScript solution for constructing a typesafe ApiRoute type that includes both /api/v1/<resource> collection paths and /api/v1/<resource>/{id} item paths from a finite Resource union?

    Show the answer

    Answer: b · A base route template interpolating Resource into /api/v1/, unioned with the same base route suffixed by /{id}

    Template literal types automatically distribute a union through an interpolated position into every concrete string permutation, so unioning BaseRoute with BaseRoute/{id} is the idiomatic, machinery-free solution. Option A is tempting because it yields the same members, but it unnecessarily uses a mapped type when direct interpolation already expands the union, and C sacrifices compile-time exhaustiveness for false flexibility.

    Read the full bite: Build a typesafe ApiRoute type using template literal types

  13. Question 13 of 30

    You convert a 10-million-row DataFrame's string column with 6 million unique values to category. What is the likely effect on memory usage?

    Show the answer

    Answer: b · Memory increases because the category codes plus unique values list outweigh a simple object array.

    When cardinality exceeds roughly fifty percent of row count, the storage cost of category codes plus the unique values list exceeds that of a plain object array. Option A is a common misconception that category dtype always reduces memory, but it is only beneficial for low-cardinality columns.

    Read the full bite: How do you analyze and reduce large pandas DataFrame memory usage?

  14. Question 14 of 30

    When wrapping a delegate-based UIKit view for use in SwiftUI, what is the correct way to handle callbacks and avoid retain cycles?

    Show the answer

    Answer: a · Provide a Coordinator object via makeCoordinator and use it as the delegate

    A Coordinator provides a stable reference to handle delegate callbacks without retain cycles. Making the representable struct the delegate is wrong because structs cannot reliably act as reference-type delegates and it introduces mutability and lifecycle issues.

    Read the full bite: Integrate SwiftUI into UIKit and wrap UIKit for SwiftUI

  15. Question 15 of 30

    When a parent mutates a nested property of an object passed to a child component, how does Vue 3's behavior differ from Angular's OnPush strategy?

    Show the answer

    Answer: d · Vue 3 recursively tracks nested access with Proxies and updates dependents automatically, while Angular OnPush skips re-rendering because the input reference remains unchanged.

    Vue 3 uses Proxy-based reactivity to intercept and trigger updates for nested mutations automatically, while Angular OnPush only checks input references and skips re-rendering when they are unchanged. Option C is wrong because Angular Default never performs deep observation; it relies on zone.js-triggered digest cycles, so it does not behave like Vue 3.

    Read the full bite: How do Vue and Angular detect nested object mutations?

  16. Question 16 of 30

    You write process(string):string and process(number):number overloads. What happens if the implementation signature uses x: string instead of x: string | number?

    Show the answer

    Answer: a · TypeScript reports an error because the implementation does not cover the number overload

    TypeScript requires the implementation signature to cover every overload, so using only string produces a compile error because the number case is unhandled. Distractor A is wrong because narrowing the implementation does not remove the number overload from the public API; it simply makes the implementation fail to type-check.

    Read the full bite: How do you type a function with string and number overloads?

  17. Question 17 of 30

    When updating a global theme in React, why does mutating a CSS custom property avoid subtree re-renders compared to updating a Context theme object?

    Show the answer

    Answer: a · CSS custom properties are mutated outside React's state, so only the browser recomputes styles without reconciliation.

    CSS custom properties live outside React state, so mutating them via setProperty updates the stylesheet without triggering subtree reconciliation. The most tempting distractor claims variables work inside media query expressions, but var() is only valid in property values, not selectors or query expressions.

    Read the full bite: CSS Custom Properties vs JS Theme Object in React

  18. Question 18 of 30

    When addressing an unmanageable Product Backlog, which strategy best applies Scrum's empirical pillars?

    Show the answer

    Answer: c · Make bloat transparent, inspect items with stakeholders, and enable the Product Owner to re-order and cut

    Making bloat transparent and empowering the Product Owner to re-order and trim waste reflects Scrum's pillars of transparency, inspection, and adaptation. Option D tempts teams eager to act quickly, yet bypassing the Product Owner violates the core accountability that the PO alone orders the backlog.

    Read the full bite: What strategy would you propose to fix an unmanageable backlog?

  19. Question 19 of 30

    Why must every container view controller have a non-nil restorationIdentifier during UIKit state restoration?

    Show the answer

    Answer: d · UIKit uses them to reconstruct the graph structure, so a missing identifier loses the entire branch

    UIKit uses restorationIdentifiers to encode the view controller hierarchy into a keyed archive, so a missing identifier on any container severs that branch entirely. Option C reflects the common misconception that restoration relies on manual visual snapshots rather than encoded graph archives.

    Read the full bite: Outline the key steps and APIs for State Preservation and Restoration

  20. Question 20 of 30

    During contextual inquiry for an internal API, you observe engineers manually calling GET after every POST to verify data persistence. What does this behavior most directly indicate should change?

    Show the answer

    Answer: d · The API should provide explicit confirmation responses and clear idempotency keys to close the trust gap.

    Manually verifying persistence signals a trust gap best closed in the API contract with explicit confirmations and idempotency keys. Rebuilding documentation is tempting because the card discusses docs, but that remedy fits engineers keeping personal error-code cheat sheets, not manual POST verification.

    Read the full bite: How do you adapt contextual inquiry for internal API and tool design?

  21. Question 21 of 30

    In a dense scatter plot of 500 points where 12 outliers must be spotted instantly, which strategy best applies pre-attentive processing?

    Show the answer

    Answer: c · Color the 12 outliers red and the rest in muted gray, keeping size and shape uniform

    Coloring only the target cohort red while muting the rest to gray leverages a single pre-attentive channel, creating true pop-out via parallel processing. Adding size and shape changes on top of hue, as in option A, creates redundant visual noise that cancels the pop-out effect and forces serial scanning.

    Read the full bite: Explain pre-attentive attributes and give three examples

  22. Question 22 of 30

    An error wrapped with fmt.Errorf using %w contains an underlying *os.PathError. Which approach lets you safely extract its Path field?

    Show the answer

    Answer: d · Use errors.As with a pointer to a *os.PathError variable

    errors.As traverses the unwrap chain and copies a matching *os.PathError into the target pointer so you can read its Path field. A direct type assertion only inspects the top-level error and silently fails when wrapping is present.

    Read the full bite: Difference between errors.Is and errors.As in Go

  23. Question 23 of 30

    You need to programmatically pause, seek, and change playback rate of an animation driven by a container's scroll position while keeping the work compositor-only. Which approach fits?

    Show the answer

    Answer: a · Create the animation with the Web Animations API and assign it a ScrollTimeline instance

    The Web Animations API paired with ScrollTimeline gives imperative control over playback rate, pausing, and seeking while the browser runs the animation on the compositor. Option B is declarative CSS, which synchronizes to scroll but does not expose those programmatic controls, and option C thrashes layout on the main thread.

    Read the full bite: How do you programmatically sync CSS animation progress to scroll?

  24. Question 24 of 30

    In FastAPI, when a dependency callable declares its own parameters using Depends, how does the framework resolve them at runtime?

    Show the answer

    Answer: d · It builds a dependency graph, resolving sub-dependencies first and injecting their results into parent dependencies.

    FastAPI's injection solver treats Depends declarations as nodes in a dependency graph, recursively resolving sub-dependencies and feeding their outputs into parent callables before the endpoint executes. This is fundamentally different from middleware, which intercepts requests at the ASGI layer rather than performing parameter-level resolution.

    Read the full bite: Explain the internal role of the Depends class

  25. Question 25 of 30

    Which statement best captures the Test Pyramid's core guidance for testing strategy?

    Show the answer

    Answer: b · It is a heuristic for maximizing feedback speed by pushing tests to the cheapest, fastest layer that still delivers confidence.

    The Test Pyramid is a heuristic about feedback loops and economic confidence, not a rigid formula, so the correct answer emphasizes pushing tests to the fastest, cheapest appropriate layer. Option D is tempting but wrong because the card explicitly warns against treating the pyramid as a fixed seventy-twenty-ten mandate.

    Read the full bite: Explain the Test Pyramid and how it guides testing strategy

  26. Question 26 of 30

    When scaling FastAPI beyond simple routes, what is the recommended pattern for combining framework-native Depends with a formal DI container?

    Show the answer

    Answer: a · Bootstrap a container during startup for singletons and deep graphs, then use thin Depends wrappers to resolve or build request-scoped services.

    The card recommends a hybrid approach: a formal container initializes singletons and deep graphs during startup, while thin Depends callables bridge request-scoped resources into FastAPI. Option C is the red flag of using Depends for everything, which scatters construction logic and hurts testability, while C creates noisy transitive coupling in routes and D sacrifices explicit lifecycle management.

    Read the full bite: How do you manage service lifecycle with FastAPI Depends versus formal DI?

  27. Question 27 of 30

    Why would a team review cache hit rate in a daily standup but P99 latency in a quarterly review?

    Show the answer

    Answer: d · Cache hit rate is an actionable leading indicator while P99 latency is a lagging outcome

    Cache hit rate is an early, actionable signal you can tune immediately, whereas P99 latency is the actual outcome that takes time to observe; distractor A reverses these roles by assigning business-value proof to the leading metric.

    Read the full bite: Describe leading vs lagging indicators with technical performance examples.

  28. Question 28 of 30

    Which finding in an 8-feature pair plot most directly justifies adding an interaction term before modeling?

    Show the answer

    Answer: b · An off-diagonal scatter showing a nonlinear trend that shifts distinctly across hue-separated clusters

    The card's concrete example links a nonlinear, class-dependent off-diagonal boundary directly to engineering an interaction term. A tight cigar suggests dropping redundancy, a skewed diagonal suggests a transform, and a single-panel outlier lacks the cross-panel triangulation the workflow requires.

    Read the full bite: Describe your systematic approach to interpreting an 8-feature pair plot

  29. Question 29 of 30

    After launching a feature that shows no metric lift, what is engineering's correct first action in a structured diagnosis?

    Show the answer

    Answer: d · Validate instrumentation, logging, and experiment assignment to confirm the null result is real

    The card specifies that engineering must first validate data integrity by checking instrumentation, logging, and experiment assignment before moving to segmentation or hypotheses. Option B is the second phase, B belongs to the third phase, and D represents the red flag of deflecting ownership and blaming users without evidence.

    Read the full bite: Your feature launches but engagement doesn't move. What's engineering's role in diagnosis?

  30. Question 30 of 30

    In a sharp RDD evaluating a scholarship for students scoring exactly 700 or above, what is the fundamental reason that the estimated effect at the threshold is considered causally identified?

    Show the answer

    Answer: a · Students just below and above the 700 threshold are assumed to be similar in all relevant characteristics except scholarship receipt.

    The correct answer captures the continuity assumption: units immediately on either side of the cutoff are effectively comparable, so any outcome discontinuity is attributed to the treatment. The most tempting distractor, A, is wrong because RDD is a quasi-experimental design that does not rely on randomization; identification comes from the deterministic rule around the threshold.

    Read the full bite: Explain Regression Discontinuity Design and propose a real-world scenario

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon