NEW
Font size
WorksheetsAL_lecture_search_algorithm
Total questions: 13
Worksheet time: 7mins
Binarysearch algoritmi qanday arraydan qidiradi
tartiblangan
Tartiblanmagan
How does a binary search algorithm works?
Dividing the list into halves until the item is matched with one in the list.
Starts with the first element and checks the next element consecutively until a match is found.
None of the above
An array with 32 elements is input to a binary search algorithm. How many maximum number of comparisons are performed?
32
16
8
5
An array with 32 elements is input to a linear search algorithm. How many maximum number of comparisons are performed?
32
16
8
5
How is the midpoint of the list calculated?
midpoint= round ((first_element+last_element)/2)
midpoint=(lower_bound+upper_bound)/2
midpoint= round ((lower_bound+upper_bound)/2)
midpoint= round ((lower_bound+upper_bound))
What is the disadvantage of binary search algorithm?
It takes longer time when compared to linear search algorithm
It works only on sorted lists
It is very complex to understand
What is the worst-case runtime of lookUp/get in a binary search tree?
O(n)
O(logn)
O(1)
O(n2)
Chiziqli va binary search qay biri tez ishlaydi
binary
chiziqli
teng
Binary search algoritmi vaqt murakkabligi
O(n^2)
O(n)
O(log n)
O(1)
chiziqli qidirish algoritmi vaqt murakkabligi
O(n^2)
O(n)
O(log n)
O(1)
Sodda qidirish algoritmini ko`rsating
binary
chiziqli
ikkitasi ham
binary qidirish algoritmi ishlash g’oyasi.........
ikkiga bo`lish va qidirish
navbat bilan qidirib borish
Sakrab qidirish
Chiziqli qidirish algoritmi ishlash g’oyasi.........
ikkiga bo`lish va qidirish
navbat bilan qidirib borish
Sakrab qidirish
