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.
Array Manipulation
Array Manipulation
Sort by
recency
|
2401 Discussions
|
Please Login in order to post a comment
Javascript :
I prepared two solution but aren't reaching the performance threshold:
Two loop:
1 loop:
c#
I see the prefix sum solutions and understand that it works, but will need some time actually see situations where I should apply it. For now, I present the missing brute force explanation with O(n^2) time complexity
TIME OPTIMIZATION: USE PREFIX SUM,expected time complexity for this is O(N) Hello guys, I had found a solution but it was exceeding the expected time limit for few test cases then i used prefix alogorithm and was able to do it
}