Originally posted by Jim Yingst:
[damian]: I know that I could access the path as well as the filename of the class I choose from the FileChoser. I could then find the package name from the path if I knew the start of the package.
It may be awkward, but this sounds like your best bet. Let's say the complete path is
I'd try these in succession:
The first one of these that returns != null, that's your class.
Originally posted by Joel McNary:
Gopi, I'm not sure what you did wrong, but We get different results for a 6-card deck with a cut of 3:
Your top and bottom cards never change; you are dropping the bottom card from the bottom stack first (as opposed to the bottom card from the top stack)
Originally posted by RArun Kumar:
What is the result for shuffles(1002,101).I am unable to find the result for shuffles(1002, 101). It runs for hours. Can anyone tell the algorithm to solve this problem. Any help is appreciated.
Originally posted by Ilja Preuss:
That link doesn't seem to work
And I don't understand why you'd need Singleton here - it seems to me as if AbstractFactory would totally suffice (and be more flexible).