Here is my code:
In this two test cases are failing, I cannot find out what is the problem.
Test Cases (Playing with cards)
Hello @Codecracaker532,
Let understand your mistake with an example:
7 2
3 4 7 6 5 8 9
Expected Output:
4
6
8
9
3
5
7
Your Output:
4
6
8
3
9
5
7
Mistake:
Order of B2 is wrong.
Explanation:
A0=[3,4,7,6,5,8,9]<-top
b1=[8,6,4]<-top
A1=[9,5,7,3]<-top
b2=[3,9]<-top
a2=[7,5]<-top
Hope, this would help.
Give a like if you are satisfied.