My code can be viewed in my github: Proverbs Github.
The following difficulty is defined by myself.

3sum-closest(medium)

The same as the two pointers method of 3-sum.

add-binary(easy)

Same mechanism as high-precision calculation.

basic-calculator(hard)

It is a quite typical problem using two stacks. However, each time I tried to solve this problem, I cannot get it accepted at my first submission.
A trick to simplify the implementation is to define the priority of operators.
Another trick is how to handle negative numbers. It can be simplify our code if we combine the - with the following number rather than regard it as a operator.

1
2
3
4
wt['+'] = wt['-'] = 1;
wt['*'] = wt['/'] = 2;
wt['('] = -1;
wt[')'] = 0;

consecutive-numbers-sum(easy)

Math: formula for sum of arithmetic progression.

design-search-autocomplete-system(hard)

A simplest method is to build a trie and search the whole current subtree when input() is called. This can be the same as brute force in the worst case.
A better method is to maintain three hottest strings for all nodes in the trie. It is quite intuitive, but I there are many details in the implementation. Thus, I marked it as hard, although it is should be medium.

insert-delete-getrandom-o1(medium)

It is quite a typical problem.
To implement O(1) random get, we can only use array. And to implement O(1) insert/remove, we can only use hashmap. So, the solution is straightforward: use hashmap to maintain the index of numbers in the array.

minimum-cost-to-hire-k-workers(hard)

The solution is not intuitive, and I thought for some time to find how to do it.
First, we cannot do it using brute force. So, according to previous experiences, can we enumerate all ratios and then calculate the minimum cost for each ratio?
The key point is how to calculate the minimum cost given a ratio.
To calculate the cost, we should select K workers with the least quality from those whose ratios are less than current ratio.
First thing went in my head is sort. Then, maintain workers whose ratios are less than current ratio, and select K workers with the least quality using priority_queue or heap.

read-n-characters-given-read4-ii-call-multiple-times(easy)

restore-ip-addresses(easy)

reverse-nodes-in-k-group(medium)

Operation of linked list.
The basic idea is to split the linked list into many linked lists, reverse them and then connect them.
To implement it in constant space makes it more complicate because we should cut constant pieces of linked list and then connect them before curring the remaining parts of the linked list.

reverse-words-in-a-string(medium)

The basic idea is to reverse the words and then reverse the whole string.