← Verkada Inc. Interview Insights

Verkada Inc.·Software Engineer·Technical Phone Screen·Intermediate

IntermediateRejected
May 2026

Summary

Did a technical phone screen for a software engineer role at Verkada. The problem was genuinely interesting but I fumbled an edge case in the IP parsing logic and I'm pretty sure that cost me the round.

Questions Asked (1)

Q1

Given a filesystem path, recursively traverse all directories and files, extract all valid IP addresses found in file contents, and return them sorted in lexicographic order.

Algorithms & Data StructuresSystem Design
Author's notes

The concept clicked fast but execution was messier than I'd like to admit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements such as handling symlinks, file size limits, and IP version. Then outline a recursive traversal using a stack or queue, reading files and extracting IPs with a regex, and finally sorting the results lexicographically. Discuss trade-offs between depth-first and breadth-first traversal, and how to handle errors gracefully.

Pro tip: Mention that you would use a compiled regex for performance and consider streaming large files to avoid memory issues. Also, note that lexicographic sorting of IPs as strings may not match numeric order, so confirm if that's intended.

1. Clarify requirements and constraints

Ask about symlink handling, maximum file size, IP version (IPv4/IPv6), and whether to include hidden files. Confirm that lexicographic sorting is required, not numeric.

2. Design traversal strategy

Choose between recursive DFS or iterative BFS/DFS. Consider using os.walk in Python or Files.walk in Java for simplicity, but be prepared to implement manually if needed.

3. Extract IP addresses from file contents

Use a well-tested regex for IPv4 (and IPv6 if required). Read files line by line or in chunks to handle large files efficiently.

4. Collect and sort results

Store extracted IPs in a set to deduplicate, then convert to a list and sort lexicographically. Return the sorted list.

5. Handle errors and edge cases

Implement error handling for permission issues, non-text files, and broken symlinks. Discuss how to skip or log errors without failing the entire operation.

Key Points to Mention

  • Use of efficient traversal (e.g., os.walk) and avoiding infinite loops with symlinks
  • Regex pattern for IPv4 validation (e.g., ensuring octets are 0-255)
  • Streaming file reads to handle large files without loading entire content into memory
  • Deduplication of IPs using a set before sorting
  • Lexicographic sorting vs numeric sorting and potential pitfalls
  • Error handling for inaccessible files or directories

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