https://www.codechef.com/problems/SPELLBOB

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-https://www.codechef.com/viewsolution/34512221