HackTheRounds Interview Experiences
Google OA Interview Experience (2026) - Folder Sync & Digit Sharing
Full walkthrough of Google's 2026 online assessment: Google Drive folder hierarchy sync (tree DP) and maximum group of two digit numbers sharing a common digit.
By Anonymous ยท 2026-04-13
Background
I went through Google's 2026 online assessment recruiting cycle in the spring. I had about 4 years of experience as a backend engineer and got the OA invite about a week after an internal referral. Two coding problems, 90 minutes on CodeSignal. This is what I got and how I would approach it now that I know the answers.
Timeline
- Referral submitted: mid-March
- OA link arrived: 6 days later, expires in 72 hours
- OA attempted: the evening I got it (do not put this off)
- Phone screen invite: 9 days after submission
- Virtual onsite: about 3 weeks after the phone screen
Total: roughly 10 weeks through offer.
Online Assessment (90 min, CodeSignal)
Both problems were medium difficulty. The twist is that the brute-force solution hits the timeout on larger test cases, so you need to think about optimization before you start typing.
Problem 1: Google Drive Folder Hierarchy Sync
Problem: You are given a folder tree for a Drive-like system. Each folder has an integer access level. The tree is considered "synced" if every parent and child pair has access levels differing by at most 1. Due to a recent update, some levels have drifted. You can only raise access levels, never lower them. Find the minimum total raise needed to make the tree synced again.
Input: tree nodes (n), tree from[n-1] , tree to[n-1] (the edges), and access level[n] (original levels). Return the minimum total raise as a long .
My approach was tree DP. For each node u, let dp[u][x] be the minimum total raise in u's subtree given that u's final level is x (with x at least u's original level). The transition: pay the cost to raise u to x, then sum each child's best cost where the child picks a final level in {x-1, x, x+1} that still respects its own lower bound. The answer is the minimum over all valid x at the root.
The trick is bounding x. You only need to consider values in [max original level, max original level + n] because raising any single node beyond the tallest existing level plus n never helps. With that bound the solution is O(n max level) which easily passes.
Problem 2: Maximum Group of Two-Digit Numbers Sharing a Common Digit
Problem: Given an array of two-digit numbers, pick the largest subset where every number in the subset shares at least one digit with every other number. For example, [52, 25, 55] all share the digit 5, so they form a valid group of size 3.
Function signature: int solution(vector<int & numbers) .
I overthought this one for a solid 5 minutes before realizing the correct interpretation. "Share a common digit" means there exists one digit d present in every number. It is not pairwise digit overlap, which would be a much harder problem.
Once you see that, the solution collapses. For each digit 0-9, count how many numbers in the input contain that digit. The answer is the maximum count across all ten digits.
O(n) time, O(1) space. The only edge case worth mentioning is numbers like 33 or 77 where both digits are the same; do not double-count them into the single-digit bucket.
Practice it: [[problem/41?company=1|Group Array by Shared Digit]]
What I Learned From the OA
The Google OA is more about reading comprehension than algorithmic tricks. Problem 1 looks scary with its "folder hierarchy sync" framing, but once you strip away the Drive-flavored language it is vanilla tree DP. Problem 2 looks trivial but the wording is designed to lead you into a harder interpretation.
Spend the first 3-5 minutes of each problem re-reading the statement and writing down the concrete input/output types. I wasted time on Problem 2 because I assumed "share a common digit" meant something more complex than it did.
Phone Screen (45 min)
After the OA I got a screener a week later. Two short problems, both standard:
- Convert a sorted array into a balanced BST (classic recursion).
- Find the missing element in a nearly-complete sequence using binary search.
Nothing unexpected. I coded both in Python and talked through edge cases.
Virtual Onsite Preview
Four 45-minute rounds on the same day: two coding, one system design, one behavioral. I will not go deep on these because the set was close enough to what I have seen in other Google writeups (Frog Jump, Verbal Arithmetic, a permutation ordering problem). If you have seen those, you have seen my onsite. The interviewers cared far more about how I narrated my thinking than about whether I hit the optimal solution on the first try.
Result
Offer came about a week after the onsite. L4 equivalent, standard comp for the level.
Tips
- Do the OA the same day you get it. The 72-hour window is a trap. Your best thinking happens when the problem is still fresh and you have not had time to psych yourself out by reading LeetCode threads.
- Read Problem 2 carefully, twice. Google loves wording that nudges you toward a harder interpretation than the problem actually requires. When something looks O(2^n), re-read the statement before you commit.
- For tree DP problems, bound your state space explicitly. On paper, before you code. Problem 1 blows up if you do not realize x only needs to range over a small window.
- Write test cases before you code. Specifically, write three: tiny (n=1 or 2), realistic (n=5-10), edge case (all same values, or maximum N). Run them mentally before submitting.
- If you are stuck for more than 10 minutes, move on. 90 minutes for two problems sounds generous until you waste 30 minutes staring at Problem 1 and then panic-code Problem 2. Get partial credit on both rather than full credit on one.
- Google OA is a filter, not the interview. The real signal is the onsite. Do not spend weeks grinding LeetCode before the OA; spend a few focused days, pass it, then prepare for the actual interviews.