To check if string A can be converted into string B by choosing a substring of A which contains \'1\' an even number of times and reverse this substring. It is given