WHy this is showing doubt
Please tell
Https://ide.codingblocks.com/s/225387
Initialize array b using a for loop, that method won’t work.
Also use and instead of or in while condition at line 28.
2 Test Cases are not working.
Please tell.
Initialize b array using -1 as if a[0] is equal to m your while loop which gives the output won’t print anything in that case.
Sir I used ur approach and when I used and there, there it showed 1 3 0 0 0 but I want only till 1 3 so I used or there but then it showed segmentation fault. So Please tell why it was showing that one.
Add this line at line 15:
for(int i = 0;i<n;i++)b[i] = -1;