(This question is a variation of the LeetCode question 128. Longest Consecutive Sequence. If you haven't completed that question yet, it is recommended to solve it first.)
A school wants to form the largest possible academic decathlon team from its students. You are given an integer array skills, where skills[i] is the skill level of one student.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected