/* *str points to the first digit in a string of base `base` digits. base
* is a power of 2 (2, 4, 8, 16, or 32). *str is set to point to the first
* non-digit (which may be *str!). A normalized int is returned.
* The point to this routine is that it takes time linear in the number of
* string characters.
根据Python source code,从以2为基数或以2为基数的任何幂次转换时,与字符数有关的是O(N)。在
相反,似乎每一个非二次幂都是(通常是?)O(N^2)。在
^{pr2}$相关问题 更多 >
编程相关推荐