Searching Algorithms

Quiz
•
Computers
•
University
•
Hard
Yomna Elkholy
Used 5+ times
FREE Resource
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Where is linear searching used?
When the list has only a few elements
When performing a single search in an unordered list
Used all the time
When the list has only a few elements and when performing a single search in an unordered list
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the best case complexity for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst case complexity for linear search?
O(nlogn)
O(logn)
O(n)
O(1)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a disadvantage of linear search?
Requires more space
Greater time complexities compared to other searching algorithms
Not easy to understand
Not easy to implement
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not an application of binary search?
To find the lower/upper bound in an ordered sequence
Searching for a word in a dictionary
Debugging
To search in unordered list
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are doneuntil the element is found using binary search?
1
2
3
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations using binary search?
90 and 99
90 and 100
89 and 94
94 and 99
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
CA mcq

Quiz
•
University
25 questions
Data Structures - Introduction

Quiz
•
University
25 questions
Technical quiz(Medium-Level)

Quiz
•
University
27 questions
Comp 210 MT2 Review

Quiz
•
University
29 questions
CSC 105 ACTIVITY

Quiz
•
University
23 questions
Search_N_Sort

Quiz
•
University
31 questions
Chapt 14

Quiz
•
University
30 questions
Binary Trees and Traversals Quiz

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade