Count minimum number of subsets (or subsequences) with consecutive numbers
Given an array of distinct positive numbers, the task is to calculate the number of subsets (or subsequences) from the array such that each subset contains consecutive numbers. Examples: Input : arr[] = {100, 56, 5, 6, 102, 58, 101, 57, 7, 103, 59}Output : 3{5, 6, 7}, { 56, 57, 58, 59}, {100, 101, 102, 103}are 3 subset in which numbers are consecut