# Big O topic is Doubt?

**URL:** <https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419>\
**Category:** Uncategorized\
**Created:** [August 27, 2025, 3:46am UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419 "2025-08-27T03:46:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivakumar](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@sivakumar](https://forum.codewithmosh.com/u/sivakumar)\
**Post date:** [August 27, 2025, 3:46am UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419/1 "2025-08-27T03:46:23Z")

</div>

what is algorithm?

I don’t know what is algorithm and who is giving input..

what is meaning algorithm scale well input grows well…. I am not understand this concept…..

I am watching many times i am not understand please explain properly anyone?

---

<div class="post-metadata">

**Author:** ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Post date:** [August 27, 2025, 4:01am UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419/2 "2025-08-27T04:01:55Z")

</div>

The idea of big O is kind of like this. There are better and faster ways of doing stuff with programming. Like if you wanted to count it’s easier to just go 1, 2, 3. But you could also go 2 steps forward 1 step back 1, 2 ,1, 2, 3, 2, 3, 4. It’s okay but if you wanted to count to a million it would be a lot slower than just adding 1. That’s kinda the idea O(1) is the fastest way, O(N) would be much slower. That’s the basic idea it’s really a foreign concept until you really figure out why each one is used. Sometimes the best you can do is the O(N) to achieve a particular task, but if you can do something easier the idea is you always should so your code is more performant, especially if it has to scale.

---

<div class="post-metadata">

**Author:** ![sivakumar](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@sivakumar](https://forum.codewithmosh.com/u/sivakumar)\
**Post date:** [August 27, 2025, 5:09am UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419/3 "2025-08-27T05:09:25Z")

</div>

An algorithm is a method to find or process data, showing how many steps or checks you need—whether one step, a few steps, or checking one by one.

Example of an Algorithm:

1. One step: Use search → find immediately.
2. Few steps: Check a few recent contacts → find it.
3. One by one: Scroll all contacts → find it. this is good or bad and another doubt algorithm scale well input grows what is meaning this line….

---

<div class="post-metadata">

**Author:** ![theorion](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/theorion/32/7783_2.png) [@theorion](https://forum.codewithmosh.com/u/theorion)\
**Post date:** [August 27, 2025, 3:21pm UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419/4 "2025-08-27T15:21:41Z")

</div>

That’s a general idea. If you were looking for a contact in your phone it might depend on what information you have.

Maybe you remember a name, search.

Maybe it’s an unknown contact but they called you a couple days ago, you scroll down recent calls.

Lastly you only remember part of a name so you scroll down contacts until you find it, maybe you have to scroll through a couple times cause your memory didn’t work the first time.

Scale means more contacts, maybe every method works for your phone you might have only 50 contacts. But if you work for a company with millions of contacts, you have to find the fastest way.

---

<div class="post-metadata">

**Author:** ![sivakumar](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@sivakumar](https://forum.codewithmosh.com/u/sivakumar)\
**Post date:** [August 30, 2025, 12:58pm UTC](https://forum.codewithmosh.com/t/big-o-topic-is-doubt/71419/5 "2025-08-30T12:58:02Z")

</div>

i have small doubt…

let a = 10;

let b = 20;

i want to compare i know which one is big or small which one i choose left side and right side a \< b or b \> a… I am not understand this concepts…. my understand two variable we can able to compare one variable to another variable that is my understand level…
