a self-written algorithm lib, including c, cpp