Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
And here I am implementing PriorityQueue with HashMap XD
welldone!
well needed some time to understand,
this is fkn genius ngl
(Integer.MAX_VALUE)! is so INCOMPREHENDINGLY huge that we probably won't ever need the number of trailing zeroes lmao
If anyone ever does, PLEASE contact me so I can see why
negative factorials don't have a value, mathematically or computationally as far as I know, becaues of the definition
n! = n*((n-1)!), where 0! = 1
this is also the reason for some other funky mathematical phenomona, but this is a CS site so
point is, this function will never be used for values where n is an element of (-∞,0)
Thanks for teaching me something new :)
Completely forgot you could multiply i in a for loop, this is the upgraded version of mine
That is short and effective solution, instead of looking for minimal and maximal values you gust sort array. And alghorithms of sorting usually work faster with almost sorted arrays. So your program may be one of the quickest, even if queues are very long.
It's really clever, but slowly. It takes for 2 time longer than solution with for loop.
what if n is -6?
it's really cool how different people process the task. Quite like your perspective
brilliant~~
my solution same as this, but i did not sort that result array ,so a little complect
GG, i had the same idea, but its the simple code, GGWP
"Clever solutions usually are not code that you would want to put into production."
Loading more items...