Skip to main content
7 events
when toggle format what by license comment
Mar 1 at 5:54 comment added no comment Factorial takes O(n log n) space, not O(1).
Feb 27 at 23:41 history edited J_H CC BY-SA 4.0
use math.factorial()
Feb 27 at 13:02 comment added rdesparbes The math module contains a factorial function: docs.python.org/3/library/math.html#math.factorial
Feb 26 at 9:40 comment added blhsing Timsort costs O(n) in space complexity for allocation of a temp array.
Feb 25 at 17:30 history edited J_H CC BY-SA 4.0
Left out an `n = len(arr)` in one of the variants -- fixed.
Feb 25 at 12:30 history edited J_H CC BY-SA 4.0
added 147 characters in body
Feb 25 at 12:18 history answered J_H CC BY-SA 4.0