Question: #include int main ( ) { int t; scanf ( % d , &t ) ; while ( t - - ) {
#include
int main
int t;
scanfd &t;
whilet
int n;
scanfd &n;
char str;
for int i ; i n; i
scanfc &stri;
int tcount ;
int pcount ;
for int i ; i n; i
ifstri
break;
if striA && striZ
stri stri;
if strit
tcount;
if strip
pcount;
if pcount tcount
printfPathaan
;
else if pcount tcount
printfTiger
;
else
printfDraw
;
return ;
why this code on hackerrank giving me segmentation fault for few of the test cases
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
