Playing with cards (stack)


Was able to pass only 1 test case
Please check my code

implemented the solution using a different approach. Still didn’t cleared the testcases Please check and reply a little fast I have not received reply to my previous query since 2 days https://ide.codingblocks.com/s/240427

@nischay1111
Sorry for the delay buddy
Your function for calculating primes is incorrect
It will push all odd numbers from 3 in your primes array
Check that logic once


i corrected prime part
still not passed

@nischay1111
Rest seems fine
Might be a small issue
Please see this code for reference

the reference code is also printing all a stacks but in problem statement they have only written to print Aq

Also this reference code is passing all test cases so i changed my code and printed all a arrays but my code still showing error