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?
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?
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.
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:
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.
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…