my sol : https://ide.codingblocks.com/s/265337
can u pls tell why my code is giving wa in 1 TC and where i need to change my sol accordingly ??
my sol : https://ide.codingblocks.com/s/265337
can u pls tell why my code is giving wa in 1 TC and where i need to change my sol accordingly ??
hi @saarthakseth, your code is correct , just the ordering of answer is different
refer above link , i have resolved same doubt as you previously
still giving wa (new code above)
hi @saarthakseth, Actually the problem was the second test case has many subproblems and one of them had 5 nodes too , so just change your condition to
if(n == 5 && j==1){
corrected code :-
got ac but is my logic correct ??
and is it the problem of the online checker of hackerblocks ? right ?
your logic is correct, its online judge issue
k thnx for your help