Maximum Consecutive Element Selection
Given an array nums of positive integers, initially, you can increase the value of any element by at most 1. Afterwards, find the maximum number of elements you can select from the modified array such that the selected elements form a consecutive sequence when sorted in increasing order.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)