Binary search

Position BinarySearch( List L, ElementType X ){ Position low = 1, high = L->Last; Position mid; while (low <= high) {...

C Grammar

This is a small mistake, but takes me two hours to find out, take a look:

Primes

How can we divide a number which is not a prime number into the multiply of prime number? Here is a conclusion:

Quicksort

The partition process is vital, the idea can be used for many problems, for example, given an array, move all the odd numbe...

Writing next_permutation function

We can order different permutations in a specific rule, in C++ we can use the next_permutation function, like this