Replace all the elements of a given array with the closest greater element to its right. Elements that do not have a greater element on their right should be replaced by -1.
17 Mar 2014 | hinaj | Programming |
Replace all the elements of a given array with the closest greater element to its right. Elements that do not have a greater element on their right should be replaced by -1.
Programming |