You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.You are given with an array. each element present in the array your task is to print the next smallest than that number. If it is not smallest print -1
1.You are given with an array. each element present in the array your task is to print the next smallest than that number. If it is not smallest print -1
You are given with an array. For each element present in the array your task is to print the next smallest than that number. If it is not smallest print -1
Input Description:
You are given a number ‘n’ representing size of array. And n space separated numbers.
Output Description:
Print the next smallest number present in array and -1 if no smallest is present