Python Tutorials - Linear Search | Searching key Element in the List Of Numbers
HTML-код
- Опубликовано: 15 дек 2024
- In this Python Pattern programming video tutorial you will learn about linear search in detail.
Linear search is a very basic and simple search algorithm. In Linear search, we search an element or value in a given array by traversing the array from the starting, till the desired element or value is found.
#Python #PythonProgramming
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy
Probably the best python channel on RUclips. Thank you so much, amazing teaching style!!
Thank you :)
Wow, your way of explaining is excellent. Really helpfull.
Your way of explaining is excellent.You are doing great work 👍🏻
Thank you :)
@@AmulsAcademy welcome:)
Only the one who make me understand things. Thank you very much!!!
Yes ma'am now I'm able to chuck any element in a list thank you so much ma'am
I'm having so much fun chucking elements 😊
Haha
Hihihihi
Thanks for your time and your support.
Regarding flag could we use condition for len of list1 and save some lines
Regarding duplication we need to put ex for duplication not only test as previous code.
Thank you Amul for a very well presented and interesting lesson.
Pleasure :)
And also u way of explaining is simply and conveniently .....
Thank you :)
Duplicate number search implementation is really helpful!
Thank you :)
Tomorrow I have model practical your video is so helpful to me thank you so much
if an elements are presented more than one times in the list and we have search that elements. and we want to find both the indexs(positions) then what are the syntax should i use ?
Wow...... And that's amazing😍🤩🤩😍ur language is so so so clear and goooooooodddd.....ur way of explanation is excellent👌👌👌👌👌👌..... Thank you so much...
Keep on doing 👍👍👍👍👍 Subscribed 😜😜
Thank you so much :)
what are you using to draw the first diagram?
Thank you for explaining the program in detail
Excellent teaching, thanks
please how did you get the auto insertion of the square bracket in the IDE
You are great! Thank you, simple and easy code!
You're welcome!
Well explained in easiest method
Thank you 😊
Really owsm .. i like your full lacture series..🤗
wow thanks, i love your idea mam..its very clear and simple ,..i love it thanks
i really enjoyed this video it helped me understand perfectly what i was struggling on thank you and i have just subscribed to your channel
Great explanation 👍thanks a lot
You are welcome :)
This helped me so much, thanks :) 🙏
Thank you its very great explanation. I love you
Thank you :)
Mam in which playlist can I find linear search bcs I am learning based on playlist .
I think you got it :)
@@AmulsAcademy no
Is this built in function or not ???
8:53 your code doesnt work in mine
How do you search or match two dataframes
hi mam, is there any video on data structures like linked list,stack,tree etc.pls upload
I will try :)
How to find the elements frequency pls maam
list_ = [9,2,6,7]
print('[9,2,6,7]')
search_ = int(input('Enter the number which you wanna pick up from the list : '))
pos = -1 #Index start with 0 #(Global Variable)
def search(list_,search_):
for i in range(len(list_)):
if list_[i] == search_:
globals()['pos']=i #Local Variable
return True
return False
if search(list_,search_):
print(f'{search_} Found at {pos} no index.')
else:
print(f'Not Found {search_}')
Why do we need the 2nd for loop for list 2
Give me the program please :)
@@AmulsAcademy this program itself
I don’t have this program with me now and I forgot what I explained in this video, so if you give me the program I can explain :)
why you create functions instead of that we can do simply using "for loop" and if else ?
Thanks di...🌼🌼
Thank you explanation
You are welcome :)
can you add elements to the key? how?
Great! helped me a lot
Mam
Y dont u try datastructures in python.
Llz do so mam
sure :)
Manually I am able to understand ur lectires.
So i request you to make it ASAP
I really need to learn datastructures and algorithms
Thanking you,
Your subscriber.
Gazab. Hi smjhaya h
Find a string from list which contains mixed variables by using loop
list1 = [1,2,3,"hello","a"]
for i in list1:
if type(i)==str:
print(i)
:)
Madam y use function..
If you don't want to use function here then don't use :)
Try this:
x = [1,3,4,5,7,9,15,5,3]
n = int(input("Enter the number you want to find: "))
lst = []
for i in range(0,len(x)):
if x[i] == n:
lst.append(i)
if lst == []:
print("Not found")
else:
print(lst)
Please how can I search a dictionary
thank you
Welcome :)
Mam please🙏 make a video on FINDING TIME COMPLEXITY FOR MAIN TOPICS OF DSA...
Will try 😊
Madam out out correct gaa ravatam leddhu 😂😂😂❤️
Mam.... please upload a video for sine series and cosine series please mam....you have only upload for histogram.....
Are you from south.....
Mam pls explain anagrams program
Ok :)
Mam your voice very sweet
Thanks a lot 😊
how to let user decide which element he wants to see in the list? For example if user inputs 4 in your list, then 19 comes up
no words to say🥰
I understood this program much clearly madam but at last in case of duplicates I did not understand why the flag variable is taken teacher
I took flag variable which stores Boolean value {True/False},Initially i will take its value as False[means initially i will take element is not found]. when element is found i will make it as True, other wise it will be False.
You can skip That, When you find the element you can print the result and using else case you can print element is not found msg.
@@AmulsAcademyDo you mean that we can take else case instead of flag variable madam
thanku so much mam.
please share ur linkedin profile
Pleasure 😊
Chuck
Good video
Nice video