IntroductionAvailable after react 16.8
React Hooks are used in functional components to manage state.
useState returns an array with exactly two elem
...
ClosureAn inner function has always access to the variables and parameters of its outer function, even after the outer function has returned.
12345678
...
48. Rotate ImageMatrix Rotation ProblemsSolution Template
123456789101112131415/* * clockwise rotate * first reverse up to down, then swap the symmetr
...
Two Pointers in One Array15. 3SumLeetcode: https://leetcode.com/problems/3sum/
Note:
Sort array (to conveniently jump over duplicates)
Use i as the m
...
Used to solve prefix sum problems. Why use BIT: can calculate prefix sums and update the sum with O(logn) efficiency.
Construct a BIT from a int array
...
Docker VolumeData PersistenceContainers were meant and designed for stateless workloads and the design of the container layers shows that.
A Docker im
...
Unix Operating SystemThe KernelThe kernel of UNIX is the hub of the operating system:
it allocates time and memory to programs
handles the filestore
...