Https://ide.codingblocks.com/s/121951

failing one test case.

i think you have given link of your other doubts link in tittle

share the link of this code here

before printing any element just make a check that count>0
you can make this check (in the condition statement) all 4 for loops