CoolMind


If you cannot measure it, you cannot improve it.

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 ...

How does tensorflow create a kernel?

This is one of the series of describing how tensorflow works. I will do my best to understand and experiment with tensorflow. In this blog I will i...

Build tensorflow on Mac

Building tensorflow from source on mac is really not an easy thing at first. This blog introduces problems met during building. Bazel installat...

How to fill a container?

Most of the time we initialize an empty instance of STL containers and keep adding elements to or removing elements from it. For example, we create...

How to Design a Scalable Rate Limiting Algorithm

任何一个服务在有限资源前提下都会存在处理能力的上限。本文主要描述限流的一些主要算法。 流控算法 Leaky Bucket (漏桶) Fixed Window (固定窗口) Sliding log (滑动日志) Sliding wi...

Revisit compare in map and set

map and set are two common associative containers. By default, common data types can be directly used as the key and their comparing method is std:...

Python closure

Python closure usually makes code simpified and are used in functional programming style. It starts with a keyword lambda and the last statement is...