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.

8415 solutions

• Other Products

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

1873 solutions

• Wave Sorting

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

1293 solutions

• Longest Increasing Sequence

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

1270 solutions

• Two Sum

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

1942 solutions

• Power Set Count

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

1098 solutions

• Food Distribution

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

655 solutions

• Three Sum

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

780 solutions

• Correct Path

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

1841 solutions

• String Periods

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

520 solutions

• Moving Median

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

185 solutions

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

4498 solutions

• Binary Search Tree LCA

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

296 solutions

• Max Subarray

For this challenge you will determine the largest sum subarray.

674 solutions

• K Unique Characters

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

471 solutions

• Bitmap Holes

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

339 solutions

• Symmetric Tree

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

297 solutions

• Binary Tree LCA

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

162 solutions

• LRU Cache

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

203 solutions

• Tree Constructor

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

305 solutions

• Word Split

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

378 solutions

• Palindromic Substring

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

265 solutions

• Trapping Water

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

160 solutions

• Matrix Path

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

87 solutions

• Seating Students

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

159 solutions

• Longest Matrix Path

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

78 solutions

• Min Window Substring

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

161 solutions

• Three Points

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

135 solutions

• Longest Consecutive

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

306 solutions

• Plus Minus

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

125 solutions

• Optimal Assignments

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

533 solutions

• Shortest Path

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

1199 solutions

• Pattern Chaser

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

778 solutions

• Weighted Path

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

367 solutions

• Gas Station

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

596 solutions

• Parallel Sums

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

165 solutions

• Pascals Triangle

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

118 solutions

• Bracket Combinations

This challenge will require knowledge of basic mathematical combinations.

140 solutions

• Maximal Square

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

1711 solutions

• Maximal Rectangle

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

49 solutions

• Bipartite Matching

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

48 solutions

• City Traffic

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

51 solutions

• Wildcard Characters

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

84 solutions

• Wildcards

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

29 solutions