
One of my wishes is that those dark trees,
So old and firm they scarcely show the breeze,
Were not, as ‘twere, the merest mask of gloom,
But stretched away onto the edge of doom.

One of my wishes is that those dark trees,
So old and firm they scarcely show the breeze,
Were not, as ‘twere, the merest mask of gloom,
But stretched away onto the edge of doom.
This summer I worked as a Research Intern at Baidu USA, responsible for the development and research of the Apollo autonomous driving platform.
The rest of this post is organized as follows.
Leetcode每周碎碎念——参加了一个训练计划,每周输出一个Leetcode题目,除了有特别想总结的专题,通常会把内容都倒到这里。
Parsing problems on leetcode are usually hard to write, hard to debug and variable for different situations, which makes it time-consuming. Sample problems might be the series of calculators. If you are trying to find a general, easy way (almost no annoying bugs after you finish it too!) to solve this kind of problems, then you should read this.
Basically this post introduce simple BNF and a easy-to-write Recursive Descent Parsing template to implement BNF.
There are many kinds of dynamic programming. DP over digit, just as its name shows, is doing dynamic programming over digits of a number. In this post, I will write a general template for this kind of problems.
First of all, we need to figure out what kind of problem it solves. The description of the problem is usually like:
Given a interval [lower, upper], find the number of all numbers $i$ that satisfy $f(i)$.
Here, the condition $f(i)$ is usually irrelated to the size of the number, but the composition of this number.
Sample Problems On Leetcode

This year is incredible! I believe I should be more prepared for the autumn job searching since it may become very difficult. One thing I guess I should do is to get more coding training for the interview process.
I believe it will be a long journey since currrently I only solve 65 out of 1200 problems. This is also the purpose of this post — to encourage & motivate myself by recording my journey on Leetcode — solving problems, attending weekly contests~

延续上一篇关于预测理论和ML的内容,本文旨在从数学角度理解和推导线性回归。
内容主要包括:
Binary search is such an easy to write algorithm but there are usually some hidden annoying bugs, such as condition of while statement (easy to get an endless loop). Besides, there are some variants like upper_bound and lower_bound searching, which makes this harder. However, if you can hold on to a same criteria of definition, things will become much easier.
In a nutshell, If you are struggling to write a CORRECT & BUG-FREE Binary Search, this might be what you need.