← Upstart Interview Insights

Upstart·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Coding screen for a software engineer role at Upstart. Pretty standard stuff, one question about list manipulation in Java. Nothing too wild but it's the kind of thing that trips you up if you're not warmed up.

Questions Asked (1)

Q1

Given a List<Integer>, filter out the odd numbers and keep only the evens, then return them in reverse order.

Algorithms & Data Structures
Author's notes

Seems trivial until you start second-guessing yourself on whether to use streams or a manual loop.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem requirements (e.g., input list, output type, handling of nulls). Then explain a two-step approach: first filter even numbers, then reverse the resulting list. Discuss time and space complexity, and consider edge cases like empty list or all odd numbers.

Pro tip: Mention that you can combine filtering and reversing in a single pass by iterating from the end of the list and collecting evens, which is more efficient. This shows you think about optimization beyond the naive approach.

1. Clarify requirements

Ask about input constraints (e.g., list size, null elements) and expected output (e.g., new list vs in-place modification). Confirm that 'reverse order' means the evens should appear in reverse of their original order.

2. Outline approach

Describe a straightforward method: iterate through the list, collect even numbers into a new list, then reverse that list. Alternatively, iterate from the end and collect evens to achieve the same result in one pass.

3. Analyze complexity

State that the time complexity is O(n) and space complexity is O(k) where k is the number of evens. Mention that the one-pass approach also has O(n) time and O(k) space but may have better constant factors.

4. Handle edge cases

Discuss cases like empty list, list with no evens, list with all evens, and potential null elements. Explain how your solution handles each.

5. Code and test

Write clean code (e.g., using Java streams or a loop) and walk through a small example to verify correctness. Mention testing with a few cases.

Key Points to Mention

  • Time and space complexity analysis
  • Use of Java Collections or Streams (e.g., filter and reverse)
  • Edge cases: empty list, all odds, all evens, nulls
  • In-place vs new list trade-offs
  • Single-pass optimization by iterating backwards
  • Readability and maintainability of code

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