Toptal Interview Question

code15 puzzle game in 15 min. on shared screen. it should pass test cases.