If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Google has launched a competition to find the best computer programmers in Europe, with £21,000 in prize money and jobs at the firm up for grabs.
This is a problem from JAM in India:
You are given a String toSort containing only ‘0’s and ‘1’s. Using only exchange operations, we must sort this string so every ‘0′ comes before every ‘1′. Return the minimal number of exchanges necessary.
“010″ Returns: 1
The string can be sorted in one swap, exchanging the second and third characters.
“1100″ Returns: 2
“00001″ Returns: 0
“10000″ Returns: 1
“1101010001″ Returns: 3
Google codeJam 2006 // some problems

