In this video, we close out our two-pointer introduction series by applying this pattern to a difficult challenge in order to optimize how we loop over an array or linked list.
Check out part 1 here: https://youtu.be/8XHE3nzjIOA
The Challenge:
Given an array of unsorted numbers, find the length of the smallest subarray that when sorted will sort the whole array.
Video Overview:
0:52 Pattern overview
2:00 Problem
3:19 Example walk through
8:55 Algorithm summary
10:35 Coding a javascript solution
25:25 Recap
Please subscribe to our channel!
What types of videos would you like to see next? Let us know in the comments.
Additional Resources:
* Practice hundreds of real coding challenges at https://coderbyte.com/
* Need more practice? Check out our channel for more videos on preparing for a coding interview https://www.youtube.com/c/CoderbyteDevelopers