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.
Almost sorted interval
Almost sorted interval
Sort by
recency
|
47 Discussions
|
Please Login in order to post a comment
Python3 solution
Hi Not sure who may look It looks like test expected output is wrong for several input test cases (I manually calculated periods for some and never got as expected output)
Moreover, then I looked at Editorial section and seems there is an error That code gives 17 count for input: 7, {3, 1, 2, 5, 4, 6, 7} Will not be there only 13: {3}, {1}, {1, 2}, {1, 2, 5}, {2}, {2, 5}, {5}, {4}, {4, 6}, {4, 6, 7}, {6}, {6, 7}, {7}?
Hi, I have written code in Ruby. It works fine in my local but here it says wrong answer for test case 4
end
here is hackerrank almost sorted interval solution
Hi ,
Im trying the brute force approach.
It is working for some of the test cases .But it is failing for some.
This is failing for testcase 1.Im not sure.I have debugged it my local.
Can someone from hackerrank take a look at it.
Can someone find it.