Solve Game of Two Stacks

Find the maximum number of integers Nick can remove from the stacks without the sum of the removed integers exceeding some x. Solving code challenges on HackerRank is one of the best ways to prepare for programming interviews.