CUET Computer/IP: Computer ScienceSearching. Free, no login required.

Q1:

2026: 21 May Shift 1

Searching

Medium

Computer Science

Given the following list of elements:

2357101112

Item to be searched = 2

Which of the following can be the middle of elements calculated by the binary search algorithm?

(A) 7

(B) 3

(C) 2

(D) 5

Answer options
Option 2
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 1

Q2:

2026: 21 May Shift 1

Searching

Easy

Computer Science

Searching a dictionary or a telephone directory is an application of which search technique?

Answer options
Option 1
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 2

Q3:

2026: 21 May Shift 1

Searching

Easy

Computer Science

Identify the search technique:

It is useful when we need to search for an item in a small unsorted list, but it is slow and time-consuming when the list contains a large number of items. The time taken to search the list increases as the size of the list increases.

Answer options
Option 3
Correct Answer
Explanation for 2026: 21 May Shift 1 CSE question 3

Q4:

2026: 20 May Shift 1

Searching

Medium

Computer Science

Take an empty hash table of size 9. The elements to be filled are 38, 57, 81, 77, 33, 44, 70, 37, 40. The table is full at the end of the operation. Consider remainder method as the hash function. What will be the index position of 81, 77, 33 and 38, respectively?

(A) 0

(B) 2

(C) 5

(D) 6

Answer options
Option 1
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 4

Q5:

2026: 20 May Shift 1

Searching

Easy

Computer Science

In the context of hashing, storing 2 elements at the same position in remainder method, results in __________.

Answer options
Option 3
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 5

Q6:

2026: 20 May Shift 1

Searching

Medium

Computer Science

Consider a list [-10, -4 ,3 ,5, 6, 8, 9]. How many comparisons will be required if binary search is applied to find the element '9'?

Answer options
Option 2
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 6

Q7:

2026: 20 May Shift 1

Searching

Easy

Computer Science

Searching a dictionary or a telephone directory or finding the element with minimum value or maximum value in a sorted list, etc. are the applications of _______________.

Answer options
Option 4
Correct Answer
Explanation for 2026: 20 May Shift 1 CSE question 7

Q8:

2026: 19 May Shift 1

Searching

Medium

Computer Science

Consider a following sorted numList comprising 9 elements:

numList = [10,11,12,17,19,23,29,31,37]

How many iterations will occur to search for element "29" using a binary search technique?

Answer options
Option 2
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 8

Q9:

2026: 19 May Shift 1

Searching

Easy

Computer Science

If every item of the list maps to a unique index in the hash table, then the hash function will be called as ________.

Answer options
Option 1
Correct Answer
Explanation for 2026: 19 May Shift 1 CSE question 9

Q10:

2026: 19 May Shift 1

Searching

Easy

Computer Science

If the hash function "element % 10" is applied to the following list 'L':

L = [34, 16, 2, 93, 80, 77, 51]

What will be the hash value of element 77?

Answer options

Q11:

2026: 19 May Shift 1

Searching

Easy

Computer Science

Match List-I with List-II

List-IList-II
(A) Linear Search(I) The key to be searched is compared with the element in the middle of a sorted list.
(B) Hashing(II) Two elements map to the same slot in the hash table.
(C) Binary Search(III) Every element of a given list is compared with the item to be searched for.
(D) Collision(IV) A function is used to calculate the value at an index in the list.
Answer options

Q12:

2026: 18 May Shift 2

Searching

Easy

Computer Science

In _____________, comparisons that do not find the key still give us the idea about the location where the key may probably be found.

Answer options

Q13:

2026: 18 May Shift 2

Searching

Easy

Computer Science

What does hashing aim to achieve in searching?

Answer options

Q14:

2026: 18 May Shift 2

Searching

Medium

Computer Science

What represents the first three steps of BinarySearch(numlist,key) algorithm?

Answer options

Q15:

2026: 18 May Shift 2

Searching

Easy

Computer Science

A perfect hash function maps every input key to _____________ in the hash table.

Answer options

Q16:

2026: 13 May Shift 2

Searching

Easy

Computer Science

Which search technique uses a ordering of elements in a list to quickly search a key?

*Note:*The elements in a list may be arranged either in ascending or descending order of their key values.

Answer options

Q17:

2026: 13 May Shift 2

Searching

Easy

Computer Science

Arrange the following Python code (for searching a list) in correct sequence?

(A) if list[index] == key:

(B) for index in range(0, len(list)):

(C) def linearSearch(list, key):

(D) return index+1

Answer options

Q18:

2026: 13 May Shift 2

Searching

Easy

Computer Science

Arrange the following to search for an element using a linear search method.

(A) Each element in the list is compared one by one with the key.

(B) Enter the key to be searched.

(C) If no element matches the key, and we have traversed the entire list, we declare the search unsuccessful.

(D) The comparison process continues until an element matching the key is found or the end of the list is reached.

Answer options

Q19:

2026: 13 May Shift 2

Searching

Easy

Computer Science

How is a hash value calculated using the remainder method?

Answer options

Q20:

2026: 11 May Shift 2

Searching

Easy

Computer Science

If the list to be searched using binary search contains an even number of elements, then the mid-value is calculated using _______________.

Answer options

Q21:

2026: 11 May Shift 2

Searching

Easy

Computer Science

Which of the following are search techniques?

A. Linear

B. Bubble

C. Binary

D. Hashing

Answer options

Q23:

2026: 11 May Shift 2

Searching

Easy

Computer Science

How many comparisons does the hash based search technique requires to find the key (in ideal scenario)?

Answer options

Q24:

2025: 3 June Shift 2

Searching

Easy

Computer Science

Which of the following search algorithm uses divide and conquer technique?

Answer options

Q25:

2025: 3 June Shift 2

Searching

Easy

Computer Science

Which of the following is the worst case time complexity of the linear search algorithm when 'n' is the number of elements in the list?

Answer options

Q26:

2025: 3 June Shift 2

Searching

Medium

Computer Science

Arrange the following steps of the binary search algorithm in the correct order.

(A) Compare the target element to the middle element of the array.

(B) If equal, return the index.

(C) If the target element is less than the middle element, then repeat search in the left subarray, else if the target element is greater than the middle element, then repeat search in the right subarray.

(D) If subarray is empty, conclude that the target element is not present in the array.

Answer options

Q27:

2025: 30 May Shift 2

Searching

Easy

Computer Science

Assume that the numList has seven elements [8, -4, 7, 17, 0, 2, 19]

If the list is not sorted and used as it is, then which among the following is the best suitable search technique to search any element?

Answer options

Q28:

2025: 30 May Shift 2

Searching

Medium

Computer Science

Match List-I with List-II

Consider a sorted list comprising 15 elements:

numList = [2, 3, 5, 7, 10, 11, 12, 17, 19, 23, 29, 31, 37, 41, 43]

List-IList-II
(A) Search for value 7 using linear search(I) Comparison=1
(B) Search for value 17 using binary search(II) Comparison=8
(C) Search for value 17 using linear search(III) Comparison=2
(D) Search for value 7 using binary search(IV) Comparison=4
Answer options

Q29:

2025: 30 May Shift 2

Searching

Easy

Computer Science

Which search technique the given steps are associated with?

Step 1: SET first = 0, last = n-1

Step 2: Calculate mid = (first+last)//2

Answer options

Q30:

2025: 27 May Shift 2

Searching

Easy

Computer Science

Which technique is used to search the key in a list using remainder method?

Answer options