ch in word. If ch is not found, return word as is.left at the start of the string (index 0) and right at the index of ch.left is less than right, swap the characters at left and right.left and decrement right after each swap.left is greater than or equal to right.