August 23, 2023

Keep Healthy

Many young people have unhealthy routines and habits. This post will introduce a reason why we should have healthy routines and habits. Read more

August 8, 2023

How to programming fast

I have a good understanding of algorithms, data structures, logic, program verification, and Vim keybindings. Why am I not fast as I thought? Read more

April 21, 2021

How new is implemented

You may be asked what’s the difference between new and malloc. In fact, they are completely different. However, in a sense, they are almost no difference. Read more

March 10, 2021

The Stack Sorting

Recently, I got stuck in the stack data structure. Everyone knows that the stack is a LIFO (Last In First Out) data structure. This is easy to understand, but not easy to use sometimes. Read more

January 21, 2021

The Welfare Crook

题目 The Welfare Crook, 出自 “Science of Programming”: Suppose we have three long magnetic tapes, each containing a list of names in alphabetical order. The first list contains the names of people woring at IBM Yorktown, the second the names of students at Columbia University and the third the names of people on welfare in New York City. Practically speaking, all three lists are endless, so no upper Read more

November 23, 2020

使用元素间索引

使用索引还是迭代器? 从 0 开始还是从 1 开始? 左闭右开还是左开右闭? 亦或是全闭/全开区间? 索引产生的微小错误让人混乱? (这也叫差一错误 (off-by-one error)). 如果你曾为这些问题困扰, 那么元素间索引的思想或许可以帮助你. Read more

Powered by Hugo & Kiss.