我更喜欢尽可能少的正式定义和简单的数学.
algorithm complexity-theory big-o computer-science time-complexity
在图像中,当对字符串数组进行排序时,我不明白多余的O从何而来。我得到排序的字符串数组将是O(log a),我不明白为什么我们也必须添加O(s)。
在我看来,O(a log a)负责整理字符串数组中的所有字符串。
sorting algorithm big-o time-complexity
algorithm ×2
big-o ×2
time-complexity ×2
complexity-theory ×1
computer-science ×1
sorting ×1