shift to 0, which will keep track of the number of shifts performed.left is not equal to right:
a. Right-shift both left and right by 1.
b. Increment shift by 1.left by shift positions to restore it to its original position but with trailing zeros.left as the result.