Today I came across the LeetCode problem Search in Rotated Sorted array, which asks you to find the index of a value in a rotated sorted array in O(log n) time.

Immediately I wanted to use a binary search to achieve O(log n) time as the array was already (almost) sorted. A sorted array might look like [1, 3, 7, 12, 17, 22, 29, 46, 58]. Since we are given a rotated sorted array, our input array would look something more like [29, 46, 58, 1, 3, 7, 12, 17, 22]. …


Learning software engineering has been extremely fun and rewarding. One of the most rewarding and exciting moments along the way was the first time I was able to get a webpage to render dynamically and change based off of buttons on the screen. It was the first time I really felt like I could create something interesting!

I first learned how to do this using JQuery. Which is a Javascript library that makes manipulating the DOM far easier than using vanilla JS. Although it doesn’t do anything that you couldn’t do without it. …


Do you like callbacks? How about callbacks in callbacks? Okay but… how about callbacks in callbacks in callbacks in callbacks? Nope, me either. You see, callbacks are great. They can help us do things that we otherwise could not. What I am referring to here, is use asynchronous functions… AND have our code work.

Javascript is a single threaded language. This means that Javascript can only do one thing at a time, and it executes code in a single sequence . Some other languages are multi-threaded, and each thread can execute code simultaneously. What this means for us as Javascript…

Matt Carlos

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store