We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Max-Min Difference in an Interval
Max-Min Difference in an Interval
Sort by
recency
|
17 Discussions
|
Please Login in order to post a comment
Table of explaination is wrong.
min list must be : [1, 1, 1, 1, 2, 1, 2, 1, 1, 4]
max list must be : [1, 2, 1, 4, 2, 2, 4, 1, 4, 4]
why was (n + 1)th value added to the array in the editorial ?
WOW...the problem statments are just confusing.
It can be solvable with two pointer and RMQ(Sparse table) in N*Q complexity.
The code for Javascript and Ruby also has the same mistakes.