Pending Decision experience hard difficulty Featured

Google - Software Engineer Interview

Google Software Engineer interview experience with 3 intensive DSA rounds focusing on algorithms, data structures, and Python concepts.

Google
Software Engineer
3 interview rounds
2024

Overview

Interviewed with Google for a Software Engineer position. The process consisted of 3 intensive DSA rounds focusing on algorithms, data structures, and Python internals.

Interview Format: Virtual (Google Meet) Total Rounds: 3 Duration: 2 days


Round 1: Intervals Data Structure

Date: Monday, September 16, 2024 Duration: ~45 minutes

Problem 1: Insert Intervals

Design a data structure to insert intervals and merge overlapping ones automatically.

Approach: Balanced BST or sorted list with merge logic

Problem 2: Query Element in Intervals

Check if a given element exists in any of the stored intervals.

Approach: Binary search on interval start points

Key Concepts: Interval problems, data structure design, time optimization


Round 2: File System with Recursion

Date: Tuesday, September 17, 2024 Duration: ~45 minutes

Problem 1: Print Directory Structure

Recursively print all directories and files in a tree format.

Write a thread-safe recursive function with callbacks to search for files containing a substring.

Python Concepts Discussed

  • Nested functions and closures
  • Callbacks and function as first-class objects
  • nonlocal keyword for variable scope
  • Thread synchronization with locks

Key Focus: Clean Pythonic code, thread safety, recursion patterns


Round 3: N-ary Tree Implementation

Date: Tuesday, September 17, 2024 Duration: ~45 minutes

Problem 1: Design Directory Structure

Choose best data structure for representing folders and files.

Answer: N-ary Tree with node properties (name, type, size, children)

Problem 2: Implement Tree Operations

  • Insert node
  • Delete node
  • Search by name
  • Calculate total size
  • List all files recursively

Problem 3: Delete Duplicate Files

Find and delete duplicate file names while maintaining tree structure.

Approach: DFS traversal with HashSet, careful pointer management

Key Concepts: Tree modification, pointer handling, duplicate detection


Key Takeaways

Preparation Time: 4 months

Focus Areas:

  • Data structures (trees, graphs, intervals)
  • Python internals and best practices
  • Recursion and backtracking
  • Thread safety and concurrency

Interview Style:

  • Very collaborative interviewers
  • Encouraged to think out loud
  • Start with brute force, then optimize
  • Code quality emphasized

Tips:

  • Test Google Meet link beforehand
  • Master tree and graph problems
  • Practice Python-specific concepts
  • Focus on time/space complexity analysis
  • Start with brute force, then optimize

Tags

DSAAlgorithmsPythonTreeFAANG

Found this helpful?

Subscribe to get interview tips, system design guides, and more.