Step 1: Check if it is strictly sorted. If so, return false.
Step 2: Apply the simplest and most naive method you have ever used
Step 3: Enjoy your free victory over 99% of C++ codes
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.