JavaScript is required for SkillDojo AI to work properly. Please enable JavaScript and refresh the page.
Coding Challenge · BEGINNER
Given a sorted array of integers and a target integer, write a function to find the smallest element in the array that is greater than the target. If no such element exists, return -1.