add PrintRestArrayInRange and unit test