- DSU (Disjoint Set Union) / Union Find
- Can find represent graph as adjacent matrix
kiểu đối xứng nhau qua trục chéo
For Binary Search Tree, Trie, and Graph, please import them manually like the following when you need to use them, as their names conflict with certain problems.
- Cannot do divide getting remainder using % with floating point numbers. If need, use
Math.floor()orMath.ceil()
- Get year from timestamptz in PostgreSQL
SELECT EXTRACT(YEAR FROM your_timestamptz_column) AS year FROM your_table;