public static int[] ones_to_right_zeros_left(int[] str)
public static char[] remove_bs(char[] str){
while(idx + bs_so_far < n)
if(str[idx + bs_so_far] == 'b')
str[idx + bs_so_far] = '\0';
str[idx] = str[idx + bs_so_far];
for(int i = 0; i < bs_so_far; i++)
public static void Main()
char[] t1 = new char[] {'a', 'a', 'b', 'b', 'c', 'a', 'a', 'b', 'a', 'b'};
Console.WriteLine(remove_bs(t1));
t1 = new char[] {'a', 'a' ,'b', 'b'};
Console.WriteLine(remove_bs(t1));
t1 = new char[] {'b', 'b', 'a'};
Console.WriteLine(remove_bs(t1));
t1 = new char[] {'a', 'a', 'a'};
Console.WriteLine(remove_bs(t1));
Console.WriteLine("Hello World");