Scribble 8: Smallest Unsorted Subarray

Here’s the problem statement: Given an array of integers find the length of the smallest subarray which when sorted will make the entire array sorted in the ascending order. For Example:The array: [2, 6, 4, 8, 10, 9, 15]Output: 5 (the subarray is: [6, 4, 8, 10, 9]) Let’s dive into the solution: Loop throughContinue reading “Scribble 8: Smallest Unsorted Subarray”

Design a site like this with WordPress.com
Get started