- remove unnecessary ";" - use std::tie for lexicographical ordering - simplify loop condition The offset always has step +1 on each iteration, so it would just hit one of the two boundary anyway