+ 3
Fastest Sorting Algorithm + General mathematics
Hello. Can someone tell me, what is the Fastest text/numbers, Sorting Algorithm ? And another question, in general mathematics: Many years ago, when I was at school, we learned all our lives, that every number, in the power of zero, equals 1. For example: 2 power 0=1. 185 power 0=1. -7 power 0=1. But, the definition of "Power" is, how many times, a number, is multiplied by itself. Then, every number, multiplied by itself 0 times, should equal 0, and not 1 !!!
5 Respuestas
+ 6
you can see it as a^b=1*(a*a*a...b times), similarily for factorial(n) can be see it as 1*(product of 1st n natural numbers), might thats actual definition.
+ 5
Merge Sort is the fastest sorting algorithm with time complexity equal to O(nlogn). Heap Sort and Quick Sort too have the same time complexity, but still are slower than Merge Sort, especially for larger inputs, because of various reasons.
For answer to the second question, if we don't multiply anything to anything, the answer is 1. This is because 1 is the multiplicative identify, not zero
Just like zero is the additive identify, (add 0 to a number, it still remains the same), similarly 1 is the multiplicative identify. (Multiply 1 to a number, the number still remains same)
+ 4
Radix sort is also fast but consume more memory
+ 2
The fight between the fastest sorting algorithm is TimSort vs IntroSort
- 1
g i
b