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.
- All Contests
- HourRank 14
- Lily's Homework
- Discussions
Lily's Homework
Lily's Homework
Sort by
recency
|
54 Discussions
|
Please Login in order to post a comment
Why the output of test case 3 2 3 1 is 1?
Will the method as given in the editorial work if all the elements are not distinct ?
Can anyone explain what editorial's code does? I don't really understand it. Brief explanation of algorithm will do. Thanks in advance!
By beautiful, it basically means ascending order? I really don't get the beautiful part.
Can anyone please point out as to where I am going wrong ? I am finding out the number of swaps involved while sorting the array in ascending order and descending order and then printing out the minimum. Still can't understand my mistake.. Here's my submission link: https://www.hackerrank.com/contests/hourrank-14/challenges/lilys-homework/submissions/code/7634222