CoolMind


If you cannot measure it, you cannot improve it.

K node from end

Problem Solution Problem This problem was asked by Google. Given a singly linked list and an integer k, remove the kth last element from t...

Bracket match

Problem Solution Problem This problem was asked by Facebook. Given a string of round, curly, and square open and closing brackets, return ...

Regular expression match

Problem Solution Problem This problem was asked by Facebook. Implement regular expression matching with the following special characters: ...

Lock or unlock a binary tree

Problem Solution Problem This problem was asked by Google. Implement locking in a binary tree. A binary tree node can be locked or unlocke...

Minimum steps to reach

Problem Solution Problem This problem was asked by Google. You are given an M by N matrix consisting of booleans that represents a board. ...

Combinations of words

Problem Solution Problem This problem was asked by Microsoft. Given a dictionary of words and a string made up of those words (no spaces),...

Minimum number of rooms required

Problem Solution Complexity analysis Problem This problem was asked by Snapchat. Given an array of time intervals (start...

Enum in Cpp and Python

Enum is very commonly used both in cpp and python. In this blog, we will introduce enumeration in cpp and python. Cpp Unscoped enumer...