Saturday, July 23, 2016

Length of the largest subarray with contiguous elements

Largest subarray with contiguous elements
http://www.geeksforgeeks.org/length-largest-subarray-contiguous-elements-set-1/
http://www.geeksforgeeks.org/length-largest-subarray-contiguous-elements-set-2/

Longest Consecutive Sequence:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.

For example, given [100, 4, 200, 1, 3, 2], the longest consecutive elements sequence should be [1, 2, 3, 4]. Its length is 4.
http://www.programcreek.com/2013/01/leetcode-longest-consecutive-sequence-java/

No comments:

Post a Comment