Implementations of algorithm and data-structures in c