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.
- New Year Chaos
- Discussions
New Year Chaos
New Year Chaos
Sort by
recency
|
24 Discussions
|
Please Login in order to post a comment
C#
Hint 1: Start from the end of the list.
Hint 2: Count swaps.
Hint 3: Swap values until they are in the "correct / original" place in line before bribes.
JS
C# solution to reverse the bribes and count them:
tried this but failed at almost every test except 1 and 2: