Code Challenges

Get better at coding with practice problems.

Coding Challenges

Select a problem, write code, run test cases, and submit your solution.

Showing 7 of 159 problems
Intermediate

Implement the method countPairsWithSum that counts index pairs whose values add up to a target. Solved

Learner

Implement the method productSign that returns the sign of the product of an integer array. Solved

Implement the method firstOccurrence that returns the first index of a target value in a sorted array. Solved

Beginner

Implement the method countEvenNumbers that returns how many even numbers are in an array. Solved

Implement the method findSecondLargest that returns the second largest distinct integer in an array. Solved

Implement the method findMax that takes an array of integers and returns the largest (maximum) value in the array. Solved

Learner

Implement the method sumArray that calculates and returns the sum of all integers in an input array. Solved