← Stackadapt Interview Insights

Stackadapt·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Probability questions at StackAdapt for a software engineering role. Nothing crazy on the coding side but they threw in some stats/probability stuff that I wasn't fully prepared for.

Questions Asked (2)

Q1

Two fair coin tosses are independent. What is the probability the second toss is Heads given the first was Tails?

Algorithms & Data Structures
Author's notes

This one's straightforward if you actually remember what independence means.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

State the independence assumption clearly, then apply the definition of independence to conclude that the first toss does not affect the second. Since the coin is fair, the probability remains 1/2. Avoid overcomplicating; the key is recognizing that independence makes the conditional probability equal to the unconditional probability.

Pro tip: Mention that this is a classic trick question testing understanding of independence versus conditional probability. Explicitly note that if the events were not independent, the answer would differ, showing you grasp the underlying concept.

1. Identify given information

Restate that there are two fair coin tosses, they are independent, and we are given that the first toss is Tails.

2. Recall definition of independence

Independence means P(A|B) = P(A). So the outcome of the first toss does not influence the second.

3. Apply to the problem

Since the second toss is fair, P(Second = Heads) = 1/2, regardless of the first toss.

4. State final answer

Conclude that the probability is 1/2, and briefly explain why the condition does not change it.

Key Points to Mention

  • Independence of events
  • Definition of conditional probability
  • Fair coin implies equal probability for Heads and Tails
  • The first toss outcome is irrelevant due to independence
  • Common misconception: gambler's fallacy
  • The answer is 1/2, not 1/4 or 1/3

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Given at least one of two fair coin tosses is Heads, what is the probability that both tosses are Heads? Walk through your reasoning explicitly.

Algorithms & Data Structures
Author's notes

This is the one that gets people and yeah it got me a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Define the sample space for two fair coin tosses, then condition on the event that at least one toss is Heads. Enumerate the equally likely outcomes satisfying the condition and compute the probability of both being Heads as the ratio of favorable outcomes to total outcomes in the conditioned space.

Pro tip: Explicitly state the assumption that the coin is fair and tosses are independent, and clarify that 'at least one is Heads' is given information, not a random event. This avoids ambiguity and shows attention to detail.

1. Define the sample space

List all possible outcomes of two fair coin tosses: HH, HT, TH, TT. Each has probability 1/4.

2. Identify the condition

The condition is 'at least one toss is Heads'. This eliminates the TT outcome, leaving HH, HT, TH.

3. Compute conditional probability

Since the remaining outcomes are equally likely, the probability of HH given at least one H is 1/3.

4. Explain the reasoning

Articulate that conditioning restricts the sample space and that the probability is the ratio of the favorable outcome (HH) to the size of the restricted space (3).

Key Points to Mention

  • Sample space for two coin tosses: {HH, HT, TH, TT}
  • Condition 'at least one Heads' eliminates TT
  • Remaining outcomes: HH, HT, TH are equally likely
  • Probability = favorable outcomes / total outcomes in conditioned space = 1/3
  • Assumption of fair coin and independence
  • Contrast with the probability of HH without conditioning (1/4)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.