Sorted Distinct
Return a list of the different values in nums, each one once, sorted from smallest to largest.
Example 1
nums [5,1,5,3,1]
returns [1,3,5]
The different values are 1, 3 and 5.
Constraints
1 <= len(nums) <= 100
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More NumPy problems
- Standard DeviationBeginner
- Swap Rows and ColumnsBeginner
- Third QuartileBeginner
- Votes TallyBeginner
- Add Column OffsetsEasy
- Age GroupsEasy
- All DifferentEasy
- Average of Chosen RowsEasy