Added script in JAVA for how many times an array has been rotated in O(log N) #2448
Conversation
siriak
left a comment
There was a problem hiding this comment.
Please add tests showing how it works. It seems that it won't work for arrays with duplicate elements
Can you tell me where to add the tests. I added 3 testcases in the file as comments. |
|
Hey @siriak , I couldn't find a solution for duplicate elements. If there are duplicate elements then maybe the complexity has to go up. Can you tell me where to add the tests(I don't know about them, can you explain)? And, I found out, I can add the solution to another such question: |
|
Just mention in the description that the array cannot contain duplicates. As for tests, we don't have anything set up, so your comments will serve the purpose. |
Done it. Thanks! |
Added the script in Searches Folder
Describe your change:
References
Checklist:
Fixes: #{$ISSUE_NO}.