Mobile Game Daily Leaderboard Score Insert
Mobile Game Daily Leaderboard Score Insert
EasyArrays100% accepted
Arjun plays a popular mobile game and his friend Meera scored 8500 points. The leaderboard is already sorted from highest to lowest. He needs to insert Meera's score in correct position.
Approach
Given sorted descending array of scores and new score, insert at correct position maintaining order.
Input
5
9000 8800 8500 7200] 8600
Output
[9000,8800,8600,8500,7200]
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards