Question DSA-STR-0074
HardWhy is checking s1 == s2 in Python O(n) in the worst case even though it looks like one operation?
- A.
Characters are compared one by one until a difference or the end
- B.
Strings are hashed first
- C.
Sign up free to see the answer and a step-by-step explanation.