 Google Interview QuestionsStudy programming and algorithm questions

Course Material

View all Interview courses
Next Interview course
• Challenges
• Powers of Two

For this challenge you will be determining whether or not a number is a power of two. 8597 solutions

• Other Products

For this challenge you will return the product of a set of elements in an array. 1984 solutions

• Wave Sorting

For this challenge you will determine if numbers in an array can be sorted in a particular way. 1361 solutions

• Longest Increasing Sequence

For this challenge you will compute the length of the longest increasing subsequence. 1435 solutions

• Two Sum

For this challenge you will determine if two elements can sum to some larger number. 2110 solutions

• Power Set Count

For this challenge you will determine the length of a power set. 1153 solutions

• Food Distribution

For this challenge you will determine how to optimally distribute food to people. 739 solutions

• Three Sum

For this challenge you will determine if three elements can sum to some larger number. 860 solutions

• Correct Path

For this challenge you will be traversing a matrix searching for the correct path to take. 2304 solutions

• String Periods

For this challenge you will need to find the smallest repeating substring. 578 solutions

• Moving Median

For this challenge you will calculate the median in an array within a sliding window. 241 solutions

For this challenge you will determine if numbers in an array can add up to a certain number in the array. 4650 solutions

• Binary Search Tree LCA

For this challenge you will attempt to find the lowest common ancestor of a binary search tree. 367 solutions

• Max Subarray

For this challenge you will determine the largest sum subarray. 737 solutions

• K Unique Characters

For this challenge you will be searching a string for a particular substring. 544 solutions

• Bitmap Holes

For this challenge you will be searching within a 2D matrix. 364 solutions

• Symmetric Tree

For this challenge you will traverse a binary tree and determine if it is symmetric. 318 solutions

• Binary Tree LCA

For this challenge you will attempt to find the lowest common ancestor of a binary tree. 184 solutions

• LRU Cache

For this challenge you will determine the order of elements within a simulated cache. 244 solutions

• Tree Constructor

For this challenge you will determine if an array of integer pairs can form a binary tree properly. 420 solutions

• Word Split

For this challenge you will attempt to split a long string of characters into actual words. 460 solutions

• Palindromic Substring

For this challenge you will be finding the longest palindromic substring. 306 solutions

• Trapping Water

For this challenge you will determine the largest amount of water you can trap within a boundary. 198 solutions

• Matrix Path

For this challenge you will determine if a path exists in a boolean matrix. 112 solutions

• Seating Students

For this challenge you will determine how many different ways students can sit next to each other. 226 solutions

• Longest Matrix Path

For this challenge you will be searching for the longest path in a 2D matrix. 87 solutions

• Min Window Substring

For this challenge you will be searching for the optimal substring of k characters. 189 solutions

• Three Points

For this challenge you will be plotting a line on a Cartesian grid. 166 solutions

• Longest Consecutive

For this challenge you will compute the length of the longest consecutive subsequence. 359 solutions

• Plus Minus

For this challenge you will need to determine how to add or subtract numbers to end up with zero. 207 solutions

• Optimal Assignments

For this challenge you will be optimally assigning tasks to a number of machines. 556 solutions

• Shortest Path

For this challenge you will have to determine the shortest path from one node to an end node. 1292 solutions

• Pattern Chaser

For this challenge you will be given a string and you will have to determine whether some sort of pattern exists. 796 solutions

• Weighted Path

For this challenge you will have to determine the shortest weighted path from one node to an end node. 379 solutions

• Gas Station

For this challenge you will be determining whether a car can get around a route with a limited amount of gas. 616 solutions

• Parallel Sums

For this challenge you will determine how to properly split an array into two sets. 181 solutions

• Pascals Triangle

For this challenge you will determine the next number in a row from Pascal's triangle. 134 solutions

• Bracket Combinations

This challenge will require knowledge of basic mathematical combinations. 154 solutions

• Maximal Square

For this challenge you will be searching a matrix for the largest square submatrix. 2794 solutions

• Maximal Rectangle

For this challenge you will be searching a matrix for the largest rectangle submatrix. 58 solutions

• Bipartite Matching

For this challenge you will be finding the maximum cardinality matching of a bipartite graph. 55 solutions

• City Traffic

For this challenge you will be finding the maximum traffic that will enter a node. 92 solutions

• Wildcard Characters

For this challenge you will determine if a string matches a set of wildcard characters. 120 solutions

• Wildcards

For this challenge you will determine if a string matches a set of wildcard characters. 78 solutions