Pack of Cards
CodeChefOpen on judge ↗
Pack Of Cards Aman and Ankur have a new deck of n cards which originally are in order where the i th card from the top has the number i written on it (1, 2, …, n-1, n). Just as their song is repetitive, so are Aman and Ankur shuffling efforts. They have been meticulously shuffling their deck once a day for many days now. The process they use is simple. They deal out the n cards from left to righ
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start