CoolMind


If you cannot measure it, you cannot improve it.

Leetcode summary of 20200223-20200301

Summary Highlight Code Section Summary Solved problems list 187. Repeated DNA Sequences 201. Bitwise AND of Numbers Range 166. ...

Ugly number I and II

Ugly numbers are numbers which only divided by 2, 3, 5. By default 1 is also a ugly number. Ugly Number I Ugly Number II Summary Related ...

Leetcode summary of 20200217-20200223

Summary Highlight Code Section Summary Solved problems list 393. UTF-8 Validation 200. Number of Islands 138. Copy List with Ra...

How to exit nested loops

Introduction Use a bool flag Use goto Use lambda function Introduction Recently when solving 999. Available Captures for Rook, I need t...

Leetcode summary of 20200209-20200216

Summary Highlight Code Section Summary Most of the problems solved are easy ones. Leetcode’s problem collection is increasing too fast....

Common functions implemented using STL

Introduction Count lines String trim Convert case Split and Join strings Filter Map Reduce Introduction STL provides a lot of u...

SuperTAB and YouCompleteMe compatibility

SuperTAB YouCompleteMe Problems SuperTAB SuperTAB Github YouCompleteMe YouCompleteMe Github Problems StackExchange SuperTAB and ...

Generate random numbers in C++

Some times we need a random number for sort or as the input of our program. Previously we can use rand() to generate. Since c++ 11, we have a new w...