← Antra Interview Insights

Antra·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Did a technical screen for a Software Engineer role at Antra and got the classic sliding window string problem. Nothing too wild, but it's one of those questions where you either know the pattern or you're fumbling around with nested loops and hoping for the best.

Questions Asked (1)

Q1

Given a string, find the length of the longest substring that contains no repeating characters.

Algorithms & Data Structures
Author's notes

I knew this was a sliding window problem pretty fast, which helped.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Use a sliding window with two pointers to maintain a window of unique characters, expanding the right pointer and shrinking the left when a duplicate is found. Track the maximum window length seen. This yields O(n) time and O(min(n, alphabet)) space.

Pro tip: At Amazon, emphasize scalability and edge cases: discuss how your solution handles large inputs and Unicode characters, and mention that you'd test with empty strings and all unique characters.

1. Clarify the problem

Ask about character set (ASCII vs Unicode), case sensitivity, and expected input size to determine constraints.

2. Outline the sliding window approach

Explain that you'll use two pointers (left and right) to represent a window of unique characters, and a hash map to store the last seen index of each character.

3. Walk through the algorithm

Iterate the right pointer through the string; if the current character is in the map and its index is >= left, move left to that index + 1. Update the map with the current index and compute the window length.

4. Analyze complexity

State that time complexity is O(n) since each character is visited at most twice, and space complexity is O(min(n, m)) where m is the alphabet size.

5. Test with examples

Run through edge cases like empty string, all unique characters, and strings with repeating patterns to verify correctness.

Key Points to Mention

  • Sliding window technique with two pointers
  • Hash map to track last seen index of characters
  • Time complexity O(n) and space complexity O(min(n, alphabet))
  • Handling edge cases: empty string, single character, all unique characters
  • Optimization for ASCII: use an array of size 128 instead of a hash map
  • Scalability for large inputs and Unicode support

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