Skip to content

Latest commit

 

History

History

challenge-41

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Maximum sequence of consecutive numbers

This problem was asked by Facebook.

Description

Given a list of integers L, find the maximum length of a sequence of consecutive numbers that can be formed using elements from L.

Example

Input: [5, 2, 99, 3, 4, 1, 100]
Output: 5 # [1, 2, 3, 4, 5]