Implementation of various algorithms and solutions to text book questions