Back to course home
0% completed
Vote For New Content
Don't we need to consider the time complexity of comparing string?
Gwonsoo Lee
Oct 28, 2024
I wonder why the time complexity is O(N) because we compare the two strings, which might take O(H) in the worst case. Shouldn't it be O(N*H)? Or can I just ignore H because the size of N is too small?
0
0
Comments
Comments