Data Structure & Algorithm
Shuffling
· β˜• 2 min read · πŸ¦‚ k4i

How to generate a random sequence (permutation) of a finite sequence.

Shuffling
Matrix Fast Pow
· β˜• 5 min read · πŸ¦‚ Kyle

Use matrix and fast pow together can make some problems much easier.

Knapsack Problems
· β˜• 3 min read · πŸ¦‚ Kyle

knapsack problem and its variations

Knapsack Problems
De Bruijn Sequence
· β˜• 4 min read · πŸ¦‚ Kyle

A de Bruijn sequence of order n on a size-k alphabet A is a cyclic sequence in which every possible length-n string on A occurs exactly once as a substring.

For a de Bruijn sequence of order n on a size-k alphabet $A$, we denote it by $B(k, n)$

De Bruijn Sequence
Segment Tree (Iterative)
· β˜• 4 min read · πŸ¦‚ Kyle

A segment tree is a binary tree where each node represents an interval. Each node stores some property of its corresponding interval: like the maximum/minimum num, the sum of that interval.

Segment Tree (Iterative)
Heap in C++
· β˜• 4 min read · πŸ¦‚ Kyle
learn how to use heap in C++
Heap in C++