Publicis Sapient Interview Question

Coding question on finding the count of longest consecutive numbers in an array and optimize it using collection.