This is my solutions for interview cake.