Finished Homework 20B with comments and Efficiency