← Bloomberg questions
CodingReported in a candidate post, Jul 2025

Longest consecutive subsequence in an integer array

Filed under Bloomberg

Given an unsorted array of integers, find the length of the longest sequence of consecutive values (such as 4,5,6,7) that can be formed using elements of the array. The elements need not be adjacent…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Bloomberg questions

Collected from public candidate posts and coding forums. Updated Nov 2026.