Playing with cards (stack) updated 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