Next Warmer Day

easy
You are given an array having temperatures on various days.
  For each day you need to find out the number of days you have to wait for the next warmer day.
  You have to return the array containing the value for  each day.

Input Format

An integer array having temperature on ith day

Output Format

return an integer array

Constraints

The length of temperatures array will be in the range [1, 30000]. 
  Each temperature will be an integer in the range [30, 100]

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
8
73
74
75
71
69
72
76
73
Output
1
1
4
2
1
1
0
0
Previous
Zig Zag Linked List
Next
Compare Two Strings After Deletions

Related Questions