Question Link :
My Answer :
https://www.codechef.com/viewsolution/34510266
just run 3 nested loops and check for every arrangement of the cards if it is possible to make the word ‘bob’
in case u need a solution-CodeChef: Practical coding for everyone