code- https://ide.codingblocks.com/s/242491
while(ch!= βXβ && ch !=βxβ); /// and use hoga
it is giving tle in every case
code-
Check out my codeβ¦