Update alg.c

- Silent warnings
- Fix incorrect swap operation in pqueue__extract()

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