give hint for playing with cards problem
Playing with cards
hello @shrutikatyal
its a simulation based problem( no logic).
just implement what they are saying.
incase the problem statement is not clear ->
in this question u are given a stack A0 , and a number q(number of iteration)
now using A0 u need to obtain A1 and B1 (procedure explained later)
now using A1 u need to obtain A2 and B2
now using A2 u need to obtain A3 and B3
now using A3 u need to obtain A4 and B4
…
…
…
now using Aq-1 u need to obtain Aq and Bq
at the end u need to print content of B1 ,B2,B3,…Bq , Aq
Then there will be Q iterations. In ith iteration, you start picking up the cards in Ai-1th pile from the top one by one and check whether the number written on the card is divisible by the ith prime number. If the number is divisible, you stack that card on pile Bi. Otherwise, you stack that card on pile Ai. these statement i dont understand what is the meaning of ith iteration here
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.