A solution finished in 4 hours for a pre-interview screening.