📜  下一个更大的元素 - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:28.633000             🧑  作者: Mango

代码示例1
Input: 
N = 5, arr[] [6 8 0 1 3]
Output:
8 -1 1 3 -1
Explanation:
In the array, the next larger element to 
6 is 8, for 8 there is no larger elements 
hence it is -1, for 0 it is 1 , for 1 it 
is 3 and then for 3 there is no larger 
element on right and hence -1.