Adding solution for problem 22

Summary: solution for problem 22

Test Plan: 871198282

Reviewers: alex

Reviewed By: alex

Differential Revision: http://phab.asshat.net/D4