YourAlly

Google Senior EM coding interview questions

These are the 14 coding questions YourAlly has tagged for Google at Senior EM. Senior EM (M2) is the level where you manage other managers.

A coding round at a large tech company usually runs 45 to 60 minutes with one or two problems. You write code that runs, test it on your own examples and state its time and space cost. Manager loops include less coding, but you still need to reason about code and review it well.

Practice a mock Google Senior EM coding loopPractice Google coding questions

Serialize and Deserialize Binary TreeFree to read

Design an algorithm to serialize and deserialize a binary tree. Serialization is the process of converting a data structure into a string so it can be stored or transmitted. Deserialization is the process of converting that string back into the original data structure. You must ensure that a tree can be serialized and then deserialized back to the same structure.

Example 1: Input: root = [1,2,3,null,null,4,5] Output: After serialize and deserialize, the tree is [1,2,3,null,null,4,5]

Example 2: Input: root = [] Output: []

Constraints: 0 <= number of nodes <= 200000 -1000 <= Node.val <= 1000

13 more coding questions

  1. Binary Tree Level Order Traversal Locked
  2. Group Anagrams Locked
  3. Invert Binary Tree Locked
  4. Longest Substring Without Repeating Characters Locked
  5. Median of Two Sorted Arrays Locked
  6. Merge Two Sorted Lists Locked
  7. Top K Frequent Elements Locked
  8. Trapping Rain Water Locked
  9. Two Sum Locked
  10. Valid Anagram Locked
  11. Word Ladder Locked
  12. Check if Palindrome Locked
  13. Contains Duplicate Locked

Sign up free to practice all 14

Related pages

More Google Senior EM rounds

Google coding at other levels

Other companies at this level

Company guide

Google interview guide in Academy