Google Software Engineer Coding & Algorithms Interview Questions
Practice 178 real Coding & Algorithms interview questions for Software Engineer roles at Google.

"I got asked a hardcore MCM DP question and I saw it on PracHub as well. Solved that question in 5 minutes. Without PracHub I doubt I could solve it in 5 hours. Though somehow didn't get hired, perhaps I guess I solved it too fast? /s"

"Believe me i'm a student here jn US. Recently interviewed for MSFT. They asked me exact question from PracHub. I saw it the night before and ignored it cause why waste time on random sites. I legit wanna go back and redo this whole thing if I had chance. Not saying will work for everyone but there is certainly some merit to that website. And i'm gonna use it in future prep from now on like lc tagged"

"10 years of experience but never worked at a top company. PracHub's senior-level questions helped me break into FAANG at 35. Age is just a number."

"I was skeptical about the 'real questions' claim, so I put it to the test. I searched for the exact question I got grilled on at my last Meta onsite... and it was right there. Word for word."

"Got a Google recruiter call on Monday, interview on Friday. Crammed PracHub for 4 days. Passed every round. This platform is a miracle worker."

"I've used LC, Glassdoor, and random Discords. Nothing comes close to the accuracy here. The questions are actually current — that's what got me. Felt like I had a cheat sheet during the interview."

"The solution quality is insane. It covers approach, edge cases, time complexity, follow-ups. Nothing else comes close."

"Legit the only resource you need. TC went from 180k -> 350k. Just memorize the top 50 for your target company and you're golden."

"PracHub Premium for one month cost me the price of two coffees a week. It landed me a $280K+ starting offer."

"Literally just signed a $600k offer. I only had 2 weeks to prep, so I focused entirely on the company-tagged lists here. If you're targeting L5+, don't overthink it."

"Coaches and bootcamp prep courses cost around $200-300 but PracHub Premium is actually less than a Netflix subscription. And it landed me a $178K offer."

"I honestly don't know how you guys gather so many real interview questions. It's almost scary. I walked into my Amazon loop and recognized 3 out of 4 problems from your database."

"Discovered PracHub 10 days before my interview. By day 5, I stopped being nervous. By interview day, I was actually excited to show what I knew."

"I recently cleared Uber interviews (strong hire in the design round) and all the questions were present in prachub."
"The search is what sold me. I typed in a really niche DP problem I got asked last year and it actually came up, full breakdown and everything. These guys are clearly updating it constantly."
Find longest duplicated substring
You are given a string s consisting of lowercase English letters. A substring of s is any contiguous sequence of characters, i.e., s[i..j) for 0 ≤ i <...
Find largest group of two-digit numbers sharing digits
You are given an integer array A of length n (1 <= n <= 100). Each element is a two-digit number (e.g., from 10 to 99). Two numbers are considered con...
Maximize coins with tokens moving by +3
You are given a 1D board represented by a string s of length n. Each character is one of: - '.' — an empty cell - 'C' — a cell containing exactly one ...
Find mode in a trinary search tree
You are given the root of a trinary search tree where each node has up to three children: `text class Node { int val; Node left; // all values ...
Minimize calls to find all bad test pairs
You have \(n\) atomic tests \(t_1, t_2, \dots, t_n\). You are given access to a black-box function: `python bool runTest(set<Test> S) ` which behaves ...
Find right-side view of binary tree
You are given the root of a binary tree. From the right side of the tree, at each depth you can see exactly one node: the rightmost node at that depth...
Implement text wrapping, waitlist, and intervals
This question evaluates skills in string parsing and word-wrapping logic, data-structure design for FIFO queue management and deletions, and interval ...
Design structure for insert and k-th largest
This question evaluates data-structure design and algorithmic efficiency for dynamic order-statistics over a multiset (duplicates allowed), focusing o...
Implement zigzag level-order traversal
Given the root of a binary tree, return the node values in zigzag level order: visit nodes level by level, reading the first level from left to right,...
Detect and remove matched words in a char stream
This question evaluates understanding of online stream processing, substring matching, and the use of efficient data structures and algorithms for rea...
Implement Batched Undo/Redo Layer
You are implementing a simplified document layer for a design tool. The layer stores properties as a map<string, string>. Implement a class that suppo...
Find numbers with exactly two sum-of-squares forms
This question evaluates understanding of integer representations as sums of two squares and the ability to reason about counting distinct unordered re...
Find conflicting pair using black-box run()
This question evaluates algorithm design and query-complexity reasoning, focusing on efficient search strategies for identifying an interacting pair v...
Implement Memory-Efficient Document Undo/Redo
This question evaluates data structure design and algorithmic reasoning for implementing memory-efficient undo/redo semantics on a key-value document,...
Design compressed vector and compute dot product
This question evaluates understanding of data structure design, sequence compression concepts (such as run-length patterns), and numeric algorithm eff...
Find horizontal cut balancing square areas
Given a 2D table with top-left origin (0, 0), you are provided a finite set of n non-overlapping, axis-aligned square cakes. Each square i has real-va...
Determine winner in stack-merging game
This question evaluates understanding of combinatorial game theory, impartial game analysis, state-space encoding, and efficient state-space search te...
Answer range queries for alternating parity subarrays
This question evaluates understanding of array manipulation, parity properties, efficient range-query processing, and preprocessing techniques for han...
Find shortest subarray with ≥k distinct integers
This question evaluates understanding of array algorithms, handling of distinct-element counting, and the ability to design time- and space-efficient ...
Design a rolling hit counter API
This question evaluates proficiency with data structures for time-window aggregation and understanding of time/space trade-offs when counting events w...