Hello, I am trying to write java code for "perfect shuffle".
Perfect shuffle is :given Ncards,you cut the cards at say ICards.
Take the bottom card from the top portion first and then bottom card from bottom portion and so on.Need to calculate how many such shuffles are needed to restore it the original order.
Can somebody give me an idea of what data structures to use.
How to proceed?