Programming Assignments of Algorithms: Design and Analysis