what is meant by Q ,not able to understand the question ,can just fully explain the question???
Doubt in understanding the question?
@Adhyayan
Q is the number of iteration.
let me explain you the sample test case with q=3
.5 3
3 4 7 6 5
after 1st iteration (1st prime no is 2)
A1->5,7,3
B1->6,4
now 2 nd iteration (2 nd prime no is 3)
A2->7,5
B2->3
now 3 rd iteration ( 3 rd prime no is 5)
A3->7
B3->5
Output numbers on these cards from top to bottom of each piles in order of B1, B2, B3,A3.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.