Driver Code
public static void Main ( String [ ] args ) { String str = "101010" ; int [ , ] Q = { { 0 , 1 } , { 2 , 5 } , { 2 , 3 } , { 1 , 4 } , { 0 , 5 } } ; int M = Q . GetLength ( 0 ) ; Console . Write ( toggleQuery ( str . ToCharArray ( ) , Q , M ) ) ; } }