标签: string ocaml big-o
在OCaml中使用String.contains()的Big-O是什么?它是否遍历每个索引,还是O(1)?
String.contains()
答案 0 :(得分:0)
它是O(n),其中n是字符串的长度。
O(n)
n