Self Studies

Computer Scienc...

TIME LEFT -
  • Question 1
    5 / -1

    What is the best-case time complexity of the Linear search?

  • Question 2
    5 / -1

    Number of comparisons done by linear search to search for key = 15 in a a list of 6 elements L=[7,3,9,15,-6,11]. 

  • Question 3
    5 / -1

    In computer science, the process of finding an item with specified properties from a collection of items is known as ______.

  • Question 4
    5 / -1

    Which searching algorithm makes less number of comparisons/iterations when the key element is present at first index of the given sorted list of 5 elements

  • Question 5
    5 / -1

    In which of the following case binary search can be applied.

  • Question 6
    5 / -1

    Consider a list of 10 elements: L=[2, 83, 63, 23, 96, 55, 12, 34, 24, 44]. Determine the number of comparisons linear search makes to search for key = 12.

  • Question 7
    5 / -1

    Consider the following Binary Search algorithm implemented in python. Choose the option that can replace the blanks (i) and (ii) respectively.

    def binarySearch(list, key):

          first = 0

          last = len(list) - 1

          while(first <= last):

              mid = (first + last)//2

              if list[mid] == key:

                   return mid

              elif key > list[mid]:

                   ___________ (i)

              else:

                   ___________ (ii)

          return -1

  • Question 8
    5 / -1

    Which of the following searching method works by comparing the value to be searched with every element of the array one by one in a sequence until a match is found?

  • Question 9
    5 / -1

    Number of comparisons/iterations done by Binary search to search for key = 15  in a list of 6 elements L=[7,3,9,15,-6,11]. 

  • Question 10
    5 / -1

    Which of the following is/are true about the search in an array data structure with N element?

    I. linear search is also called random search

    II. At worst case, the number of comparisons needed in linear search is N

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Submit Test
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now