我在多个 DSA 中看到的问题是 (1, <= nums.length , <= 105) so if the constraints are given then how do I know the exact or estimate time complexity after seeing the constraints ??? can someone explain in an easy way??
我看到了很多限制,但我无法找出问题的时间复杂度,你能帮助我吗?
如果给定大小约束,则时间复杂度为 O(1)。仅当输入大小可变时才会发生非常数复杂度。