Follow Techie moments (@techiemoments) · Instagram photos and Reels
I solved and practiced these problems to crack the Google interview. Follow TechieMoments on
Instagram and show some appreciation if you found this helpful.
# Title Difficulty Frequency DS/Algo
388 Longest Absolute File Path Medium 527 stack
681 Next Closest Time Medium 526 array
904 Fruit Into Baskets Medium 525 window
Minimum Domino Rotations For
1007 Medium 524 array
Equal Row
288 Unique Word Abbreviation Medium 521 dict + pegion
1057 Campus Bikes Medium 520 sort
byte
271 Encode and Decode Strings Medium 519
conversation
Binary Tree Longest Consecutive
298 Medium 518 recur
Sequence
281 Zigzag Iterator Medium 517 iterate
809 Expressive Words Medium 516 linear
361 Bomb Enemy Medium 514 dp
222 Count Complete Tree Nodes Medium 513 recur
Longest Substring with At Most
159 Medium 512 hashmap
Two Distinct Characters
299 Bulls and Cows Medium 511 map
418 Sentence Screen Fitting Medium 510 iterate
Most Stones Removed with Same dis-joint
947 Medium 509
Row or Column component
351 Android Unlock Patterns Medium 508 dfs
394 Decode String Medium 507 stack
939 Minimum Area Rectangle Medium 506 map
200 Number of Islands Medium 505 union
Longest Substring with At Most K
340 Medium 504 hashmap
Distinct Characters
56 Merge Intervals Medium 503 linear
833 Find And Replace in String Medium 502 in-parts
737 Sentence Similarity II Medium 500 uf
146 LRU Cache Medium 497 deque
Follow Techie moments (@techiemoments) · Instagram photos and Reels
280 Wiggle Sort Medium 496 sort
846 Hand of Straights Medium 495 hash
304 Range Sum Query 2D - Immutable Medium 494 prefix
946 Validate Stack Sequences Medium 493 stack
2 Add Two Numbers Medium 492 list
284 Peeking Iterator Medium 491 buffer
289 Game of Life Medium 490 encoding
253 Meeting Rooms II Medium 489 sort
Split Array into Consecutive
659 Medium 488 Linear
Subsequences
1146 Snapshot Array Medium 487 hash
Maximum Points You Can Obtain
1423 Medium 486 dp
from Cards
247 Strobogrammatic Number II Medium 483 recur
Longest Continuous Subarray With
1438 Absolute Diff Less Than or Equal to Medium 482 heap
Limit
Longest Word in Dictionary through
524 Medium 481 sub-seq
Deleting
279 Perfect Squares Medium 480 recur
375 Guess Number Higher or Lower II Medium 479 dp
444 Sequence Reconstruction Medium 478 topological
Time Needed to Inform All
1376 Medium 477 dfs/bfs
Employees
model into
1066 Campus Bikes II Medium 476
graph problem
360 Sort Transformed Array Medium 475 merge
900 RLE Iterator Medium 474 bucket
Maximize Distance to Closest
849 Medium 473 n
Person
911 Online Election Medium 472 bs
406 Queue Reconstruction by Height Medium 471 simulation
294 Flip Game II Medium 470 recursive
274 H-Index Medium 469 binary
Longest Line of Consecutive One in
562 Medium 468 dp
Matrix
Follow Techie moments (@techiemoments) · Instagram photos and Reels
951 Flip Equivalent Binary Trees Medium 467 recur
1087 Brace Expansion Medium 466 tokensize_recur
276 Paint Fence Medium 465 dp
528 Random Pick with Weight Medium 464 bs
731 My Calendar II Medium 463 sorted array
Longest Substring Without
3 Medium 462 window
Repeating Characters
57 Insert Interval Medium 461 binary
139 Word Break Medium 460 dp
490 The Maze Medium 459 dfs
616 Add Bold Tag in String Medium 458 bitmap
221 Maximal Square Medium 457 dp
166 Fraction to Recurring Decimal Medium 454 array
320 Generalized Abbreviation Medium 452 recur
722 Remove Comments Medium 451 linear
Random Point in Non-overlapping
497 Medium 450 log(N)
Rectangles
362 Design Hit Counter Medium 449 circular matrix
963 Minimum Area Rectangle II Medium 447 n^2
447 Number of Boomerangs Medium 446 n^2
687 Longest Univalue Path Medium 445 dfs
400 Nth Digit Medium 444 maths
31 Next Permutation Medium 443 array
LIS with binary
1048 Longest String Chain Medium 442
Search
729 My Calendar I Medium 441 log(n)
353 Design Snake Game Medium 440 Simulate
981 Time Based Key-Value Store Medium 439 binary serach
249 Group Shifted Strings Medium 438 map
505 The Maze II Medium 437 dfs
bit-manuplicati
318 Maximum Product of Word Lengths Medium 436
on
380 Insert Delete GetRandom O(1) Medium 435 o(1)
5 Longest Palindromic Substring Medium 433 DP, n^2
Follow Techie moments (@techiemoments) · Instagram photos and Reels
Compare Strings by Frequency of
1170 Medium 432 [Link](N).L
the Smallest Character
38 Count and Say Medium 431 recursive
334 Increasing Triplet Subsequence Medium 430 (n)
840 Magic Squares In Grid Medium 429 n^2
130 Surrounded Regions Medium 428 dfs
855 Exam Room Medium 427 binary-search
332 Reconstruct Itinerary Medium 426 dfs
162 Find Peak Element Medium 425 linear
Find First and Last Position of
34 Medium 424 binary-search
Element in Sorted Array
752 Open the Lock Medium 423 bfs
50 Pow(x, n) Medium 422 recur
208 Implement Trie (Prefix Tree) Medium 421 prefix
835 Image Overlap Medium 420 brute
743 Network Delay Time Medium 419 bfs
853 Car Fleet Medium 418 sort
173 Binary Search Tree Iterator Medium 417 stack
475 Heaters Medium 416 linear
341 Flatten Nested List Iterator Medium 415 recursive
Minimum Swaps To Make
801 Medium 414 DP, n^2
Sequences Increasing
215 Kth Largest Element in an Array Medium 413 heap
43 Multiply Strings Medium 411 maths
817 Linked List Components Medium 410 linear set
91 Decode Ways Medium 409 DP
133 Clone Graph Medium 408 hash
695 Max Area of Island Medium 407 dfs
369 Plus One Linked List Medium 406 linked-list
11 Container With Most Water Medium 405 linear-dp
286 Walls and Gates Medium 404 bfs
Letter Combinations of a Phone
17 Medium 403 dfs
Number
324 Wiggle Sort II Medium 402 counting sort
529 Minesweeper Medium 401 simulate
Follow Techie moments (@techiemoments) · Instagram photos and Reels
767 Reorganize String Medium 400 count + array
484 Find Permutation Medium 399 linear
22 Generate Parentheses Medium 398 recur
337 House Robber III Medium 397 recur
347 Top K Frequent Elements Medium 396 linear
33 Search in Rotated Sorted Array Medium 395 heap
150 Evaluate Reverse Polish Notation Medium 394 stack
moore voting
229 Majority Element II Medium 393
algo
776 Split BST Medium 391 recursive
138 Copy List with Random Pointer Medium 390 map
935 Knight Dialer Medium 389 dp
250 Count Univalue Subtrees Medium 388 recursive
379 Design Phone Directory Medium 386 lld
Binary Tree Longest Consecutive
549 Medium 385 recursive bt
Sequence II
1197 Minimum Knight Moves Medium 384 bfs
62 Unique Paths Medium 383 dp
652 Find Duplicate Subtrees Medium 380 map
636 Exclusive Time of Functions Medium 378 stack
684 Redundant Connection Medium 377 union-find
64 Minimum Path Sum Medium 376 dp
96 Unique Binary Search Trees Medium 374 dp
486 Predict the Winner Medium 373 dp
498 Diagonal Traverse Medium 372 array
Count Square Submatrices with All
1277 Medium 371 dp
Ones
79 Word Search Medium 370 dfs
198 House Robber Medium 369 dp
210 Course Schedule II Medium 368 topo sort
240 Search a 2D Matrix II Medium 365 linear
676 Implement Magic Dictionary Medium 364 hashmap
417 Pacific Atlantic Water Flow Medium 363 dfs
1352 Product of the Last K Numbers Medium 362 queue
Follow Techie moments (@techiemoments) · Instagram photos and Reels
609 Find Duplicate File in System Medium 361 array
769 Max Chunks To Make Sorted Medium 360 linera
36 Valid Sudoku Medium 357 recur
165 Compare Version Numbers Medium 356 compare
48 Rotate Image Medium 354 transpose
49 Group Anagrams Medium 353 map
894 All Possible Full Binary Trees Medium 351 recur
55 Jump Game Medium 350 maintain reach
518 Coin Change 2 Medium 349 dp
Divide Array in Sets of K
1296 Medium 346 [Link]
Consecutive Numbers
152 Maximum Product Subarray Medium 345 linear
593 Valid Square Medium 344 math
285 Inorder Successor in BST Medium 343 recur
419 Battleships in a Board Medium 341 dfs
63 Unique Paths II Medium 340 dp
238 Product of Array Except Self Medium 339 dp
384 Shuffle an Array Medium 337 [Link]
71 Simplify Path Medium 336 stack
365 Water and Jug Problem Medium 335 [IMP]
370 Range Addition Medium 334 linear (n)
Lowest Common Ancestor of a
236 Medium 333 recur
Binary Tree
540 Single Element in a Sorted Array Medium 332 bst
373 Find K Pairs with Smallest Sums Medium 331 2 pointer
692 Top K Frequent Words Medium 330 counter
Design Add and Search Words Data
211 Medium 329 trie type ka
Structure
986 Interval List Intersections Medium 327 array, heap
1138 Alphabet Board Path Medium 325 dfs
721 Accounts Merge Medium 324 hash
510 Inorder Successor in BST II Medium 323 Samajh gayi
949 Largest Time for Given Digits Medium 322 brute-force
322 Coin Change Medium 321 dp
Follow Techie moments (@techiemoments) · Instagram photos and Reels
582 Kill Process Medium 320 dfs
310 Minimum Height Trees Medium 319 remove leaves
973 K Closest Points to Origin Medium 318 heap
560 Subarray Sum Equals K Medium 317 linear + set
469 Convex Polygon Medium 316 maths
dfs +
979 Distribute Coins in Binary Tree Medium 315
deltaMove
binary-search
300 Longest Increasing Subsequence Medium 314 on innter dp
loop
97 Interleaving String Medium 313 dp, n2
Construct Binary Tree from
889 Medium 312 recur
Preorder and Postorder Traversal
46 Permutations Medium 311 recut
277 Find the Celebrity Medium 309 degree
251 Flatten 2D Vector Medium 308 recur
1060 Missing Element in Sorted Array Medium 307 bst
Populating Next Right Pointers in
117 Medium 306 recur, hash
Each Node II
382 Linked List Random Node Medium 305 map
1219 Path with Maximum Gold Medium 304 dfs
311 Sparse Matrix Multiplication Medium 303 map
Flatten a Multilevel Doubly Linked
430 Medium 302 recur
List
230 Kth Smallest Element in a BST Medium 301 in-order till k
209 Minimum Size Subarray Sum Medium 300 linear
Maximum Sum of Two
1031 Medium 299 prefix sum
Non-Overlapping Subarrays
Populating Next Right Pointers in
116 Medium 298 hash
Each Node
207 Course Schedule Medium 297 topo sort
Search in a Sorted Array of
702 Medium 296 bst
Unknown Size
213 House Robber II Medium 294 dp
909 Snakes and Ladders Medium 293 bfs
1564 Put Boxes Into the Warehouse I Medium 292 sort
Follow Techie moments (@techiemoments) · Instagram photos and Reels
621 Task Scheduler Medium 291 Linear
256 Paint House Medium 290 dp
Construct Binary Tree from
105 Medium 288 recur
Preorder and Inorder Traversal
890 Find and Replace Pattern Medium 287 map
807 Max Increase to Keep City Skyline Medium 286 dp
1254 Number of Closed Islands Medium 285 dfs
348 Design Tic-Tac-Toe Medium 284 map
Find Minimum in Rotated Sorted
153 Medium 283 bst
Array
98 Validate Binary Search Tree Medium 282 recur
Maximum Font to Fit a Sentence in
1618 Medium 281 math
a Screen
739 Daily Temperatures Medium 280 stack
Longest Repeating Character
424 Medium 279 dp
Replacement
950 Reveal Cards In Increasing Order Medium 234 simulation
sort idx and
975 Odd Even Jump Hard 222
monotone
489 Robot Room Cleaner Hard 220 bt
1231 Divide Chocolate Hard 219 binary
42 Trapping Rain Water Hard 213 dp
248 Strobogrammatic Number III Hard 212 generate
String Transforms Into Another
1153 Hard 211 map
String
Print Immutable Linked List in
1265 Medium 210 linear
Reverse
218 The Skyline Problem Hard 210 merge
1096 Brace Expansion II Hard 209 recursive
296 Best Meeting Point Hard 207 median
Count of Smaller Numbers After
315 Hard 206 stack
Self
149 Max Points on a Line Hard 205 n2
1088 Confusing Number II Hard 203 generator
Shortest Distance from All run bfs from
317 Hard 195
Buildings each node
Follow Techie moments (@techiemoments) · Instagram photos and Reels
527 Word Abbreviation Hard 193 trie and map
552 Student Attendance Record II Hard 192 recursive
4 Median of Two Sorted Arrays Hard 191 expression
23 Merge k Sorted Lists Hard 189 merge
818 Race Car Hard 188 graph, bfs
295 Find Median from Data Stream Hard 187 heap
269 Alien Dictionary Hard 179 typological
329 Longest Increasing Path in a Matrix Hard 166 dp
535 Encode and Decode TinyURL Medium 156 dp
815 Bus Routes Hard 156 bfs
41 First Missing Positive Hard 155 sort
37 Sudoku Solver Hard 148 recur
84 Largest Rectangle in Histogram Hard 147 stack
212 Word Search II Hard 146 tri
Minimum Cost to Make at Least create graph +
1368 Hard 145
One Valid Path in a Grid bfs
480 Sliding Window Median Hard 132 heap
797 All Paths From Source to Target Medium 126 dfs
591 Tag Validator Hard 126 stack
174 Dungeon Game Hard 124 dp
1377 Frog Position After T Seconds Hard 119 dfs
654 Maximum Binary Tree Medium 108 recursive
1000 Minimum Cost to Merge Stones Hard 101 dp
1506 Find Root of N-Ary Tree Medium 99 deg/traversal
1044 Longest Duplicate Substring Hard 96 binary search
493 Reverse Pairs Hard 95 sort & count
Divide Array Into Increasing
1121 Hard 93 map
Sequences
1463 Cherry Pickup II Hard 87 2-pointer dfs
1329 Sort the Matrix Diagonally Medium 81 list
1079 Letter Tile Possibilities Medium 75 dfs
All People Report to the Given
1270 Medium 72 SQL
Manager
1302 Deepest Leaves Sum Medium 68 recur
Follow Techie moments (@techiemoments) · Instagram photos and Reels
Minimum Number of Operations to
1769 Medium 67 n^2
Move All Balls to Each Box
dfs //
839 Similar String Groups Hard 47
union-find
1660 Correct a Binary Tree Medium 46 bfs
827 Making A Large Island Hard 45 dfs
1630 Arithmetic Subarrays Medium 44 sort
Find Valid Matrix Given Row and
1605 Medium 38 dp
Column Sums
Minimum Number of Vertices to
1557 Medium 35 topo
Reach All Nodes
1547 Minimum Cost to Cut a Stick Hard 34 dp
1494 Parallel Courses II Hard 12 topological
Form Largest Integer With Digits
1449 Hard 11 dp
That Add up to Target
906 Super Palindromes Hard 6 generator
656 Coin Path Hard 4 jump