How does the time complexity of an algorithm with a runtime of O(log n) compare to that of an algorithm with a runtime of O(n)?

1 answer

Answer

1044310

2026-08-14 08:55

+ Follow

An algorithm with a runtime of O(log n) has a faster time complexity compared to an algorithm with a runtime of O(n). This means that as the input size (n) increases, the algorithm with O(log n) will have a more efficient performance than the one with O(n).

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.