Today I will continue my journey through sorting algorithms with quick sort. Let’s take a look at the process.
In my quest to become a better developer I have embarked on a journey to learn about sorting algorithms. I have decided to start with a Merge Sort and will be creating Ruby code to do it!
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one call to isSubstring (e.g. “waterbottle” is a rotation of “erbottlewat”).
Given an image represented by an N x N matrix, where each pixel in the image is repesented by an integer, write a method to rotate the image by 90 degrees. Can you do this in place?