← Boeing Interview Insights

Boeing·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Did a coding screen for a full-stack role at Boeing. One question, pretty straightforward string problem, nothing wild.

Questions Asked (1)

Q1

Given a string, find the index of the first character that does not repeat anywhere else in the string. Return -1 if none exists.

Algorithms & Data Structures
Author's notes

Two-pass approach: count frequencies first, then scan again for the first character with a count of 1.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem and edge cases, then propose an efficient solution using a hash map to count character frequencies in one pass, followed by a second pass to find the first character with count 1. Discuss time and space complexity, and consider alternative approaches if needed.

Pro tip: Mention that you can optimize to a single pass by storing both the count and the first index of each character, then scanning the map for the minimum index with count 1. This shows you think about efficiency beyond the obvious.

1. Clarify requirements and edge cases

Ask about input constraints (e.g., character set, string length, case sensitivity) and edge cases like empty string, all repeating characters, or non-alphabetic characters.

2. Propose a two-pass hash map approach

Explain that you'll use a hash map to count occurrences of each character in the first pass, then iterate through the string again to find the first character with count 1.

3. Analyze complexity

State that time complexity is O(n) and space complexity is O(k) where k is the number of distinct characters (or O(1) if the character set is fixed).

4. Discuss alternative or optimized approaches

Mention that you could use an array if the character set is small (e.g., ASCII), or a single-pass approach storing first index and count, then finding the minimum index with count 1.

5. Test with examples

Walk through a few examples, including edge cases, to verify the solution and demonstrate correctness.

Key Points to Mention

  • Hash map for frequency counting
  • Two-pass vs. single-pass trade-offs
  • Time and space complexity analysis
  • Handling edge cases (empty string, no unique character)
  • Character set assumptions (ASCII vs. Unicode)
  • Potential optimization using arrays for fixed character sets

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