Same code did not get right answer for me

@deepgarg46 your code is not exactly same look inside the second for loop and in the second for loop look at the second while loop i.e. line number 21. it should be !q.isEmpty() but you have not written ‘!’.

1 Like