Maximum consecutive integers present in an array

Given an array of integers. Find the maximum number of consecutive integers present in the array. For example, if the array is: int arr[] = { 2, 24, 22, 60, 56, 23, 25}; Then the answer should be 4, because there are 4 consecutive integers present in the array (22, 23, 24, 25). Solution: The […]
 •  0 comments  •  flag
Share on Twitter
Published on October 13, 2018 23:29
No comments have been added yet.