Skip to content

Files

Latest commit

Aug 12, 2019
f8e9343 · Aug 12, 2019

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Aug 12, 2019
Aug 12, 2019

Given an array of elements, return the length of the longest subarray where all its elements are distinct.

For example, given the array [5, 1, 3, 5, 2, 3, 4, 1], return 5 as the longest subarray of distinct elements is [5, 2, 3, 4, 1].