Oracle Application Software Developer
Summary
During my interview for an Application Software Developer position at Oracle, I was asked to solve a problem involving finding the longest consecutive sequence in an unsorted array.
Full Experience
My interview experience for the Application Software Developer role at Oracle primarily focused on a technical question. The problem presented to me involved analyzing an unsorted array to determine the longest consecutive sequence within it, with specific constraints regarding sorting and duplicate handling.
Interview Questions (1)
Given an unsorted array, we have to find the length of the longest consecutive sequence.
Note: The solution should not sort the array or use any data structure which inherently sorts the array. The array may also contain duplicates, so each unique value should be counted only once.
Example:
Input: {100, 98, -1, 0, 99, 1, 3, 4, 2, 5, 67}
In this, the sequence -1, 0, 1, 2, 3, 4, 5 is the longest consecutive sequence. The count is 7, so the output is 7.