Solved A, add C, update alg.c

- alg.c: add type-independent queue implementation.

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>