x/step is no more than "2 pi / step", which is a constant for given "step".
where does the log n come from?
所有跟帖:
•
我的code还是O(n), 但是可以优化到 O(logn),因为不必从0开始一步一步走,而是通过插值。另外因为同时算
-兄贵-
♂
(0 bytes)
()
12/08/2022 postreply
20:04:04
•
因为同时算sin和cos,所以每隔 Pi/4, 数值就重复了,可以通过三角函数公式得到其他x的sin值
-兄贵-
♂
(0 bytes)
()
12/08/2022 postreply
20:05:42
•
你并没有回答我的问题。我还是等风景吧
-trivial-
♀
(0 bytes)
()
12/08/2022 postreply
20:12:31