Delete all A chars from string and double all B chars in the string by using O(n) extra space.