← Deloitte questions

Next Greater Element for every element in an array

Filed under Deloitte

Given an array, print the Next Greater Element (NGE) for every element. The Next Greater Element for an element x is the first greater element on the right side of x in the array. Elements for which…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Deloitte questions

Collected from public candidate posts and coding forums. Updated Nov 2026.