Oracle OA 2022 | Arrays & Subarray Math | on-campus

Oracle · Question · Posted Jun 2026

Question 1: Rearrange Sequence - 1 Problem Statement You are given an array of size N containing unique integers. Find the size of the largest subarray that can be rearranged to form a contiguous sequence. A contiguous sequence means that the difference of adjacent elements should be exactly 1. Input Format The first line of input contains T - the number of test cases. It's followed by 2T lines, the first line contains N - the size of the array. ...

The full answer & interview discussion are available to premium members.

Log in Create a free account