Pregunta de entrevista de Siemens Digital Industries Software

how many swaps needed to make binary string sorted