Returns a slice of water up to the first index i where water[i] is not zero and
water[i] is not equal to rock[i]. If no such index exists, returns a copy of water.
Takes a mutable vector of vectors (strings), and manipulates the vectors in it by chopping the successive digits using the chop_digits function.
The sequences are processed based on their lexicographic order.
Performs long division on a vector of numerators with a single denominator.
Element-wise, each numerator is divided by the denominator, with any remainder carried to the next iteration.