BrowserStack SDE-1 OA 2025 | Spirally Sorted Array & Test Suite Optimization Window
Question · Posted Jun 2026
Problem 1 - Spirally Sorted Array Problem Statement You are given an array of N integers. An array is considered spirally sorted if its elements form a strictly increasing sequence when read using the following alternating order: 0, N-1, 1, N-2, 2, N-3, ... Return: 1 if the array is spirally sorted. 0 otherwise. Constraints Constraint 1 ≤ N ≤ 105 -109 ≤ arr[i] ≤ 109 Test Case Input Output [1, 10, 14, 20, 18, 12, 5] 1 [1, 12, ...
The full answer & interview discussion are available to premium members.
Log in Create a free account