Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Can we find the length of the longest subarray with sum>k efficiently?

$
0
0

Here, 'k' can be any integer.

My O(nlogn) solution is as follows :- https://ideone.com/Ff3CcO

Is there any O(n) algorithm for above?

Thanks.

Note:- 1)I've done my research. 2)No, this problem does not belong to any ongoing contest in the world :-)


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>