CoolMind


If you cannot measure it, you cannot improve it.

Climb up staircase

Problem Solution Reference Problem This problem was asked by Amazon. There exists a staircase with N steps, and you can climb up either ...

An autocomplete system

Problem Solution Comments Problem This problem was asked by Twitter. Implement an autocomplete system. That is, given a query string s a...

Job scheduler

Problem Solution Reference Problem This problem was asked by Apple. Implement a job scheduler which takes in a function f and an integer...

Maximum non-adjacent sum

Problem Solution Problem This problem was asked by Airbnb. Given a list of integers, write a function that returns the largest sum of non-...

Xor linked list

Problem Solution Comments Problem This problem was asked by Google. An XOR linked list is a more memory efficient doubly linked list. In...

Universal tree

Problem Solution Problem This problem was asked by Google. A unival tree (which stands for “universal value”) is a tree where all nodes un...

Decode ways

Problem Solution Problem This problem was asked by Facebook. Given the mapping a = 1, b = 2, … z = 26, and an encoded message, count the n...

Cdr and car of a pair

I have subscribed to a website. Every day an email will be sent to my email about the description of the problem. Problem Solution Problem ...