Code Challenges

Get better at coding with practice problems.

Coding Challenges

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

Showing 14 of 33 problems
Intermediate

Implement the findSecondLargestDistinct method that returns the second largest distinct value from the array. Solved

Implement the moveZerosToEndCopy method that returns a copy of the array with all zero values moved to the end. Solved

Implement the isArrayStrictlyIncreasing method that checks whether every array element is greater than the element before it. Solved

Implement the reverseArrayCopy method that returns a new array with the input elements in reverse order. Solved

Beginner

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

Implement the method countConsonants that returns the number of consonants in a string. Solved

Beginner

Implement the method sumOfSquares that returns the sum of squares from 1 to n. Solved

Learner

Implement the method fibonacci that returns the nth Fibonacci number. Solved

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

Implement the method countOccurrences that takes a string and a character as input and returns the number of times that character appears in the string. Solved

Beginner

Implement the method sumDigits that takes an integer as input and returns the sum of its digits. Solved

Learner

Implement the method factorial that takes a non-negative integer as input and returns its factorial. Solved

Implement the method countVowels that returns the number of vowels present in a given string. Solved

Learner

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