Darth's blog

By Darth, history, 6 years ago, In English

Hello guys.

I was trying to solve this problem by Just Contest 2.0, about to find the next greater element. For exemple:

Array = [1, 5, 4, 7, 9]

Ans = [5, 7, 7, 9, -1]

-The input is 105.

My solution:

Solution

My implementation:

Implementation

Someone can explain-me where I did wrong? Or my idea is not correct?

Thaks!

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it