https://ide.codingblocks.com/s/270014 https://hack.codingblocks.com/app/contests/1236/556/problem can u tell why 2 test cases are failing and also give example for itteration of 2 or 3 so that i can crosschk it
Playing with card(stack)
Check for input
5 2
1 2 3 4 5
Expected o/p:
2
4
3
5
1
Crosscheck the approach and the logic from here: Playing with cards
You can refer this implementation