Skip to content
tezvyn:

Top 30 Interview Interview Questions and Answers

30 multiple-choice questions on Interview, drawn from 30 bites out of the 114 tagged Interview 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

    In Kotlin, what does declaring a variable with val guarantee about the referenced object?

    Show the answer

    Answer: c · The reference cannot be reassigned, though the object's contents may still mutate

    val only prevents reassigning the reference itself, so a val holding a MutableList can still be modified. The most tempting distractor confuses reference immutability with deep object immutability, which val does not enforce.

    Read the full bite: Explain val vs var in Kotlin and null safety risks

  2. Question 2 of 30

    Which task best fits the SRE definition of toil rather than overhead or engineering project work?

    Show the answer

    Answer: a · Manually rerunning the same failed batch job every night by hand

    Manually rerunning the same job nightly is manual, repetitive, automatable, and scales with the service, the hallmarks of toil. Designing a system is engineering; meetings and interviews are overhead.

    Read the full bite: What defines toil, with an example?

  3. Question 3 of 30

    How should a healthy production ML lifecycle be structured from start to finish?

    Show the answer

    Answer: c · As an iterative loop starting with business problem framing and continuing through post-deployment monitoring

    The correct answer is B because the card describes the lifecycle as an end-to-end engineering process that begins with business goal definition and requires continuous monitoring and feedback loops after deployment. The most tempting distractor is D because treating packaging as the final step omits critical monitoring, retraining, and validation stages that keep a production model healthy.

    Read the full bite: Describe the key stages of a typical ML lifecycle

  4. Question 4 of 30

    You write an async def FastAPI endpoint that calls requests.get. What is the main risk?

    Show the answer

    Answer: c · The event loop is blocked, freezing concurrent request handling until the call finishes.

    The correct answer is C because calling a blocking library like requests inside async def stalls the event loop, stopping all other requests. The most tempting distractor is A because beginners often assume FastAPI magically threadpools any blocking code, but only def endpoints are run in a threadpool.

    Read the full bite: What is the difference between def and async def in Python and FastAPI?

  5. Question 5 of 30

    If user is null, what happens when evaluating user?.name ?: "Guest"?

    Show the answer

    Answer: b · It returns Guest without throwing an exception

    The safe call operator ?. returns null when user is null, and the Elvis operator ?: then substitutes Guest as the fallback. Option C is tempting because ?. does preserve nullability, but it ignores that ?: immediately provides the default value.

    Read the full bite: What do the safe call and Elvis operators do in Kotlin?

  6. Question 6 of 30

    Why should an internal SLO target be set stricter than the externally promised SLA?

    Show the answer

    Answer: d · To create a safety margin that triggers internal action before the contract is breached

    A stricter SLO gives early warning so the team reacts before violating the SLA and owing penalties. The other options misstate measurement windows, visibility, and the SLI relationship.

    Read the full bite: SLI vs SLO vs SLA: how do they relate?

  7. Question 7 of 30

    Which statement correctly explains why an ID selector beats a class selector when they conflict?

    Show the answer

    Answer: c · The ID rule wins because the specificity algorithm compares the ID column first, and 1-0-0 outranks 0-1-0

    Specificity is a three-column value scored as ID-CLASS-TYPE, so an ID's 1-0-0 always beats a class's 0-1-0 before the CLASS column is ever evaluated. The most tempting distractor claims the later class wins, but source order only breaks ties when specificity is equal.

    Read the full bite: What color wins when an ID and class rule conflict?

  8. Question 8 of 30

    Which statement best captures the relationship between SRE and DevOps?

    Show the answer

    Answer: a · SRE is a prescriptive implementation of the broader DevOps philosophy

    SRE provides concrete practices, SLOs, error budgets, blameless postmortems, that implement the abstract DevOps principles. They are complementary, not competing, and they operate at different levels of abstraction.

    Read the full bite: How do SRE and DevOps relate?

  9. Question 9 of 30

    When building an async execution-time decorator for FastAPI, why is omitting functools.wraps on the inner wrapper considered a red flag?

    Show the answer

    Answer: b · It strips the original function's metadata, which breaks FastAPI's OpenAPI schema generation and dependency injection.

    functools.wraps preserves the original function's name, signature, and metadata, which FastAPI relies on to generate OpenAPI docs and resolve dependencies; omitting it exposes the wrapper's metadata instead. Distractor A is wrong because wraps has no effect on whether code runs synchronously or blocks the event loop.

    Read the full bite: Write an async decorator that logs execution time for FastAPI

  10. Question 10 of 30

    When defining the first SLIs for a user-facing service, what should they primarily measure?

    Show the answer

    Answer: b · Aspects of the service as experienced by users, such as request success and latency

    Good SLIs reflect user-visible behavior, since the goal is to measure user happiness. CPU and deploy counts are internal signals that can look fine while users suffer.

    Read the full bite: How do you set SLOs for a service from scratch?

  11. Question 11 of 30

    A class declares late final UserService repo and assigns it in initState. What happens if repo is read in build before that assignment?

    Show the answer

    Answer: a · A LateInitializationError is thrown at the point of access

    late shifts definite-assignment checks from compile time to runtime, so accessing the field before assignment throws LateInitializationError. Distractor C is tempting because that is exactly the compile-time error you would receive if the field were not marked late.

    Read the full bite: What problem does late solve in Dart?

  12. Question 12 of 30

    Which operation is valid on a variable of type unknown without first narrowing its type?

    Show the answer

    Answer: b · Assigning a string value to the unknown variable

    Any value can be assigned to an unknown variable, but you cannot read properties, call methods, or assign it to a narrower type without narrowing first. Options A and D confuse unknown with any, which is assignable to all types, while B requires narrowing because the compiler cannot guarantee the method exists.

    Read the full bite: Explain the difference between any and unknown, and demonstrate type-safe narrowing

  13. Question 13 of 30

    An error budget is fully spent early in the quarter. What is the most appropriate first response?

    Show the answer

    Answer: d · Invoke the pre-agreed error budget policy and analyze what consumed the budget

    The budget is a pre-agreed signal that triggers a policy and a data-driven analysis of the burn. Blaming individuals, a permanent ban, or ignoring it all defeat the budget's purpose as an objective tradeoff tool.

    Read the full bite: Error budget exhausted early: what now?

  14. Question 14 of 30

    What is the best way to prioritize which toil to automate first?

    Show the answer

    Answer: c · Rank by return on investment, weighing frequency and time saved against automation effort and risk

    Prioritizing by ROI, frequency times time saved versus effort and risk, maximizes recovered engineering time. Irritation, ease alone, or script count are poor proxies for actual impact.

    Read the full bite: How do you find and eliminate toil systematically?

  15. Question 15 of 30

    Which statement accurately describes how Dart closures handle captured variables from an enclosing function?

    Show the answer

    Answer: d · They capture the variable binding by reference in a heap-allocated environment

    Dart closures capture the variable binding by reference in the heap, so the inner function retains access even after the outer function returns and its stack frame is popped. This makes B incorrect because the enclosing function's stack frame does not remain on the call stack after it returns.

    Read the full bite: What is a Dart closure? Write a function that returns a function.

  16. Question 16 of 30

    Why is demosaicing necessary after a Bayer sensor captures an image?

    Show the answer

    Answer: a · Because each photosite records only one color channel, leaving missing values to estimate.

    Demosaicing is required because every photosite measures only a single color channel, so the missing two channels must be interpolated from neighbors. Option D represents the common misconception that Bayer pixels already contain complete RGB data.

    Read the full bite: How does a Bayer filter capture color and what is demosaicing?

  17. Question 17 of 30

    Which getProperty signature both rejects invalid keys at compile time and returns the exact type of the requested property?

    Show the answer

    Answer: c · Two generics T and K where K extends keyof T and the return type is T[K]

    Option C is correct because constraining K with extends keyof T limits keys to valid properties on T, while T[K] preserves the exact type of the accessed property. Option D is tempting because keyof T does restrict keys, but T[keyof T] produces a union of all property types rather than the specific one for the key passed.

    Read the full bite: Create a generic getProperty using generics and keyof

  18. Question 18 of 30

    Why is blamelessness essential to a postmortem's effectiveness at improving reliability?

    Show the answer

    Answer: c · It creates psychological safety so engineers disclose full, honest details needed to fix systemic causes

    Blamelessness removes fear of punishment so people share complete information, and you can only fix what you fully understand. It does not skip root cause or action items, nor magically prevent recurrence by itself.

    Read the full bite: What makes a blameless postmortem effective?

  19. Question 19 of 30

    In a specificity conflict between `#header` and a selector with eleven classes, which statement is true?

    Show the answer

    Answer: a · The `#header` selector wins because the ID column outweighs any number of classes

    The card explains that specificity is a tuple where the leftmost nonzero column wins, so one ID always beats any number of classes. Option D is tempting because it reflects the common error of collapsing the tuple into a single integer.

    Read the full bite: How is CSS specificity calculated for a complex selector?

  20. Question 20 of 30

    Why does self-attention use three separate learned projections of the same input rather than the raw embeddings directly?

    Show the answer

    Answer: a · It allows the model to learn which token features to use for matching versus which to pass forward as content

    The correct answer reflects that learned projections decouple the matching process from content retrieval, letting the model decide which aspects of a token to use for scoring and which to propagate forward. The distractor describing a decoder query with encoder key and value defines cross-attention, not self-attention, where all three matrices are derived from the same input sequence.

    Read the full bite: Explain Q, K, and V matrices in self-attention

  21. Question 21 of 30

    In Swift, what is a key advantage of providing default behavior through a protocol extension rather than an abstract base class?

    Show the answer

    Answer: d · It enables structs and enums to reuse behavior without being forced into an inheritance hierarchy.

    Protocol extensions let structs and enums gain shared behavior without being forced into an inheritance hierarchy, unlike abstract base classes. They cannot add stored properties, so any answer suggesting they extend state is incorrect.

    Read the full bite: Explain protocols and how extensions provide default implementations

  22. Question 22 of 30

    Which approach best lets a risky feature launch despite a nearly exhausted error budget while upholding reliability?

    Show the answer

    Answer: d · Roll out behind a flag to a small canary, gate progression on live burn, and get explicit risk sign-off

    Canary plus flag plus burn-gated rollout and documented risk acceptance contains blast radius while enabling the business. A flat refusal, a full rollout, or hiding errors all abandon reliability discipline.

    Read the full bite: Risky launch with a near-empty error budget?

  23. Question 23 of 30

    A conversion metric drops suddenly with no recent deployments. Segmenting reveals an identical percentage loss across all devices, channels, and geographies. What does this pattern most strongly indicate?

    Show the answer

    Answer: d · A global instrumentation problem such as a broken tag or attribution change

    A uniform percentage loss across every dimension is the hallmark of a global instrumentation break such as a missing tag or attribution change. The most tempting distractor is a business regression, but jumping to product or marketing causes without first reconciling frontend events against backend transactions treats the metric as ground truth before validating data integrity.

    Read the full bite: Conversion metric dropped suddenly with no recent deployments; debug instrumentation causes

  24. Question 24 of 30

    What fundamentally distinguishes the SRE response to a recurring high-volume alert from a traditional ops response?

    Show the answer

    Answer: a · SRE treats it as a defect to automate or eliminate so effort scales sublinearly with load

    SRE applies software engineering to remove the recurring work entirely, breaking the link between load and headcount. Faster manual response, more dashboards, or more engineers are the linear-scaling ops pattern SRE avoids.

    Read the full bite: SRE vs traditional ops on a recurring alert?

  25. Question 25 of 30

    When writing a swap function in Swift, what advantage does using a generic placeholder T provide over accepting parameters of type Any?

    Show the answer

    Answer: d · Generics enforce that both parameters are the same concrete type and avoid runtime casting

    Generics preserve compile-time type information, ensuring both arguments share the same type and eliminating unsafe downcasting. Distractor A is tempting because Any permits heterogeneous values, but a generic swap<T> explicitly prevents mixing types, which is exactly why it is type-safe.

    Read the full bite: What are Swift generics, why useful, and write a swap function?

  26. Question 26 of 30

    An upstream service breaches its SLO solely because a downstream dependency had an outage. How should a well-designed error budget policy handle the burn?

    Show the answer

    Answer: c · Attribute the burn to the downstream service that caused the failure

    Correct attribution charges the responsible downstream team, creating proper incentives and shielding the upstream victim. Charging the upstream team, splitting blindly, or ignoring it all distort accountability.

    Read the full bite: Error budget policy across dependent microservices?

  27. Question 27 of 30

    In a distributed web service, which telemetry type is best for pinpointing which downstream service is adding latency to a single slow request?

    Show the answer

    Answer: d · Distributed traces, because they follow one request's spans across services

    Traces follow a single request across services and attribute time to each span, localizing the slow hop. Metrics show aggregate trends and logs give per-event detail, but neither maps one request's cross-service path like a trace.

    Read the full bite: Explain the three pillars of observability

  28. Question 28 of 30

    When designing a pipeline to discover unknown pain-point categories from thousands of unstructured reviews, which sequence best ensures valid grouping and reliable severity ranking?

    Show the answer

    Answer: c · Deduplicate and normalize the corpus, cluster to discover themes, then apply sentiment analysis within each cluster to rank by severity.

    The correct sequence matches the card's recommended lifecycle: preprocess to remove noise and duplicates, use unsupervised clustering to discover emergent themes since categories are unknown, and score sentiment within each cluster to rank pain points by frequency and severity. Option A is a tempting distractor because LLMs are popular, but the card flags jumping straight to summarization without cleaning as a red flag that yields unreliable, unvalidated output.

    Read the full bite: Outline an NLP pipeline to categorize reviews and identify pain points

  29. Question 29 of 30

    Which set correctly lists the Four Golden Signals for monitoring a user-facing system?

    Show the answer

    Answer: b · Latency, traffic, errors, and saturation

    The Four Golden Signals are latency, traffic, errors, and saturation, focused on user experience and capacity. CPU and memory are resource metrics; logs and traces are observability pillars, not the golden signals.

    Read the full bite: What are the Four Golden Signals?

  30. Question 30 of 30

    When initializing UI handlers on a page with external images, which distinction between DOMContentLoaded and window.load matters most?

    Show the answer

    Answer: d · DOMContentLoaded fires after deferred scripts run but does not wait for images, letting handlers bind earlier

    DOMContentLoaded fires after HTML parsing and deferred scripts complete, so you can bind UI handlers before heavy assets like images finish, whereas window.load waits for all subresources. The most tempting distractor reverses the two events: window.load is the one that waits for every asset, not DOMContentLoaded.

    Read the full bite: Describe the difference between DOMContentLoaded and window.load

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