Interview Riddles - Difference of 2 numbers in sorted array
Channel: ProgramArtist
Date: 11/06/2017

In this episode I solve the 'Difference of 2 numbers in sorted array' interview riddle.
The riddle: "Given a sorted array of numbers and a difference D find 2 numbers whose difference is D"
In previos episode I solved the similar riddle, the difference was that the array wasn't sorted.
When we know this little detail, we can improve our algorythm and make in with constant space.

00:39 Solution motivation
05:02 Solution code
08:39 Examples using Quokka
09:34 Solution overview
11:07 Solution complexity discussion

You can see all the code here:
https://github.com/slavik57/interview-riddles

Interview Riddles:
https://www.youtube.com/playlist?list=PLtm06noQc9vmHGUVoafpM4L6aGjTsdVP0

TypeScript Modules:
https://youtu.be/0FvaxUzzA0g

Learn TypeScript:
https://www.youtube.com/playlist?list=PLtm06noQc9vmfoC4U0w90HTIRzpVKeXlC