p0029

package
v0.0.0-...-4302f07 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 0 Imported by: 0

README

常规做法就是单循环里用n不断减去m,时间复杂度O(n/m)。可以采用类似矩阵快速幂的优化方法, 事先预处理出所有的m*(2^n)<=n,这样复杂度就能降低到log级

time complexity: O(log(n/m))

space complexity: O(log(n/m))

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL