algo-004 programming assignment 2,4 solutions