Blog

CtCI - Array Left Rotation

Cracking the Coding Interview; Array Left Rotation; A left rotation operation on an array of size N shifts each of the array's elements one unit to the left. For example, if two left rotations are performed on array [1,2,3,4,5], then the array would become [3,4,5,1,2]. Given an array of N integers and a number, D, perform D left rotations on the array. Then print the updated array as a single line of space-separated integers.

CtCI - Simplify Selection Ranges

Cracking the Coding Interview; Simplify Selection Ranges; You are given an array of numbers and must simplify the array by replacing ranges of three or more items with the shorthand N-M equivalent and returning the result as a string, sorted from lowest to highest.

CtCI - Triforce Secret Realm

Cracking the Coding Interview; Triforce Secret Realm; Link has been sent to the Secret Realm to find the Triforce and save Hyrule. But the vile Ganondorf followed Link into the "Temple of Time", trapped him, and took the Triforce for himself. The "Temple of Time" has been closed for a thousand years now, but the Sages finally found you and they need your help to open the Temple of Time's door and join Link in the ultimate battle.

CtCI - Glass Stacking

Cracking the Coding Interview; Glass Stacking; You are given a number N of glasses. Your job is to determine the largest pyramid that can be built with the glasses provided, and then create that pyramid in the output. A glass is represented in by an arroba. Each floor in the pyramid must be centered and the glasses must be separated by a single white space between them.

CtCI - Sum Pair Finder

Find a pair of indexes in an unordered integer array where the sum of the numbers in both indexes is equal to the target. If the solution uses brute-force find a way to optimize the solution to find the pairs indexes faster. Assume that one and only one pair of indexes sums up to the target, so you do not need to keep comparing the results after you find the first pair of indexes.

CtCI - Overlapping Ranges

Cracking the Coding Interview; Overlapping Ranges; Given a list of objects containing the login and logout times for multiple users, determine what is the maximum number of concurrent users logged in at the same time.

CtCI - Integer to String

Cracking the Coding Interview; Integer to String; Given an unsigned integer, return the corresponding ASCII character representation without using language built-in features.

CtCI - Balanced Parenthesis

Cracking the Coding Interview; Balanced Parenthesis; Determine if there is a parenthesis balance in a given string.

Google Billboard Puzzle

Have you seen this billboard before? This was part of a campaign to recruit engineers to work at Google in 2004, and since then it has become a recurrent approach by recruitment companies to bring geniuses to work for the big four IT companies, even today more than ten years after this billboard we still can find challenges like this as a starting point for an interview process.

Do you have a project idea? Let's make it together!