---
title: "Comment by Sandeep Panda on \"WTF is O(log n)?\" | Hashnode"
description: "Great explanation of O(log n)! I especially liked the analogy with guessing a number. Can you expand on how O(log n) compares to other time complexities like O("
url: "https://hashnode.com/posts/wtf-is-olog-n/650badfe158de30a948afee5/comment/650be5916e010e234b1ce629"
---

[Discussion](https://hashnode.com/posts/wtf-is-olog-n/650badfe158de30a948afee5)

Comment [WTF is O(log n)?](https://hashnode.com/posts/wtf-is-olog-n/650badfe158de30a948afee5)

[Sandeep Panda](https://hashnode.com/@sandeep)

[Sep 21, 2023](https://hashnode.com/posts/wtf-is-olog-n/650badfe158de30a948afee5/comment/650be5916e010e234b1ce629)

Great explanation of O(log n)! I especially liked the analogy with guessing a number.

Can you expand on how O(log n) compares to other time complexities like O(n) or O(n^2) in terms of efficiency, and which is best for which types of problems? I think this can help a lot of beginner developers compare all options and gain a bit more insight.
