File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Help in knowing how the code works Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Help in knowing how the code works " Watch "Help in knowing how the code works " New topic
Author

Help in knowing how the code works

krishna kumar.s
Greenhorn

Joined: Oct 01, 2011
Posts: 19
The below code produces the unique numbers if numbers 2 to 100 are powered by 2 to 100 i.e 2 pow 2 2 pow 3..... 100 pow 100 . But i am not understanding how the code eliminates duplicates .
Anayonkar Shivalkar
Bartender

Joined: Dec 08, 2010
Posts: 1295

krishna kumar.s wrote:But i am not understanding how the code eliminates duplicates .

Hint: What data structure are you using to store your data(i.e. x pow x)?


Regards,
Anayonkar Shivalkar (SCJP, SCWCD, OCMJD)
krishna kumar.s
Greenhorn

Joined: Oct 01, 2011
Posts: 19
I got it the Hash set only takes unique values
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 4904
    
    7

krishna kumar.s wrote:I got it the Hash set only takes unique values

ANY java.util.Set (←click) only stores unique values. You can give it any value you like.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
krishna kumar.s
Greenhorn

Joined: Oct 01, 2011
Posts: 19
Hi
Anayonkar Shivalkar and Winston Gutkowski thanks a lot for your input .

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help in knowing how the code works
 
Similar Threads
BigInteger exponents - how?
pow()
math question (natural log - ln)
massive non-Mersenne prime
BigInteger Power/Exponent BigInteger