Company: NIKE

Difficulty: medium

Problem Statement

In the enchanting land of Sortedonia, there exists an array of integers called "nums." Legend has it that a mystical operation can be performed in this realm. The operation allows you to choose two indices, i and j, where i < j, and if nums[i] < nums[j], you can remove the elements at those indices. The remaining elements maintain their original order, and the array is re-indexed. Now, brave adventurer, your quest is to find the minimum length of nums after performing this magical operation any number of times, including zero. The array nums is sorted in non-decreasing order, and your analytical skills will guide you through the enchanted array to unveil its hidden length. May your journey be filled with wisdom and triumph!

More NIKE OA questionsInterview experiences