← Adobe Interview InsightsSoftware Engineer

Adobe·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

Adobe SWE interview that leaned heavily into array problem variants. The core question was straightforward but the follow-ups kept coming and that's where things got interesting.

Questions Asked (2)

Q1

Given an unsorted integer array, find all duplicate numbers. Walk through different approaches and their trade-offs.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Started with hash-set, which they expected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying constraints (e.g., array size, value range, memory limits) and then present multiple approaches: brute force, sorting, hash set, and in-place marking (if values are within 1..n). Compare time/space trade-offs and discuss which is optimal for given constraints. Conclude with a recommended solution and mention edge cases.

Pro tip: At Adobe, interviewers value practical trade-off analysis; explicitly discuss when the in-place marking approach is applicable (e.g., values in range 1..n) and its limitations, showing you consider real-world constraints.

1. Clarify constraints

Ask about array size, value range, whether the array can be modified, and memory constraints. This determines which approaches are feasible.

2. Present brute force and sorting

Mention O(n^2) brute force and O(n log n) sorting approaches, noting their simplicity but inefficiency for large inputs.

3. Discuss hash-based approach

Explain using a hash set to track seen numbers, achieving O(n) time but O(n) extra space. Highlight its simplicity and general applicability.

4. Introduce in-place marking (if applicable)

If values are in range 1..n, use index marking (negation or adding n) to find duplicates in O(n) time and O(1) extra space. Explain the algorithm and its constraints.

5. Compare and recommend

Summarize trade-offs and recommend the best approach based on constraints. Mention edge cases like multiple duplicates, no duplicates, and large arrays.

Key Points to Mention

  • Time and space complexity of each approach (brute force, sorting, hash set, in-place marking).
  • The in-place marking technique works only when array values are within 1..n and the array is mutable.
  • Hash set approach is simple and works for any integer range but uses O(n) extra space.
  • Sorting approach modifies the array and takes O(n log n) time, but may be acceptable if sorting is allowed.
  • Edge cases: empty array, single element, all duplicates, no duplicates, negative numbers, and large input sizes.
  • Trade-off between time and space: sometimes O(n) space is acceptable, but in memory-constrained environments, in-place is preferred.

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

Q2

If all values in the array are bounded between 1 and 200, what additional approaches become viable? Compare bitmask, counting array, and in-place index marking.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This is where I got a little tripped up.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that the bounded range (1-200) allows trading space for time or using the array itself as a hash table. Then compare bitmask, counting array, and in-place marking in terms of time/space complexity, mutation, and practical trade-offs, and recommend the most suitable approach based on constraints like memory limits and whether the input can be modified.

Pro tip: Mention that in-place marking is often preferred in memory-constrained environments, but it mutates the input and can be error-prone; always clarify with the interviewer whether mutation is allowed and whether the range is inclusive.

1. Clarify the problem and constraints

Ask whether the array can be modified, if extra space is allowed, and what the exact range is (inclusive of 200). This determines which approaches are viable.

2. Explain the bitmask approach

Use a bitmask of size 200 bits (e.g., 4 64-bit integers) to track presence. It uses O(1) space (constant, ~25 bytes) and O(n) time, but only works for presence/absence, not counts.

3. Explain the counting array approach

Allocate an array of size 200 (or 201) to count frequencies. It uses O(1) space (constant, ~800 bytes) and O(n) time, and supports frequency queries, but requires extra space.

4. Explain in-place index marking

Use the array itself to mark visited indices by negating or adding an offset (e.g., add 200). It uses O(1) extra space and O(n) time, but mutates the input and requires careful handling to avoid overwriting.

5. Compare and recommend

Summarize trade-offs: bitmask is most space-efficient but limited to presence; counting array is simple and supports counts; in-place marking saves space but mutates input. Recommend based on constraints (e.g., if mutation allowed and memory tight, use in-place; if counts needed, use counting array).

Key Points to Mention

  • Time complexity: all three approaches are O(n) time.
  • Space complexity: bitmask uses ~200 bits (constant), counting array uses ~200 integers (constant), in-place marking uses O(1) extra space.
  • Bitmask is ideal for presence/absence but cannot count frequencies.
  • Counting array is straightforward and supports frequency queries but requires extra space.
  • In-place marking modifies the input array and can be tricky to implement correctly (e.g., handling duplicates, negative values).
  • The bounded range (1-200) makes all three approaches effectively constant space, so the choice depends on other factors like mutation allowance and need for counts.

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