he every1,
can sum1please helpme here, i am really stuck.
i have a quston to do and iv no idea how to even start.
the question:
A standard pack of
cards can be represented as an array of 52 integers with each number representing a standard card. Thus:
0 1 2 3 4 5 6 7 8 9 10 11 12 ..... 39 40 41 42 43 44 45 46 47 48 49 50 51
We can shuffle this pack of
cards by randomly generating two indexes and swapping those two cards. For example if we randomly generate the indexes 8 and 50 and swap these two "cards" we would get (assuming this is the first swap):
0 1 2 3 4 5 6 7 50 9 10 11 12 ..... 39 40 41 42 43 44 45 46 47 48 49 8 51
After a suitable number of swaps have been made the pack can be said to be "shuffled".
Design and implement a
Java programme which takes as input the number of desired swaps, outputs an ordered Set of cards which are then "shuffled" and output again. The number of swaps must be at least 1 and not more than 1000.
please please please help me with this.
any help at all is much appreciated
chris