compose Ranges from given numbers
Problem Statement: Given a sorted integer array that does not contain any duplicates, return a summary of the number ranges it contains.
Example
For nums = [-1, 0, 1, 2, 6, 7, 9], the output should besolution(nums) = ["-1->2", "6->7", "9"].
String[] ...
booleanbit1.hashnode.dev1 min read