ADA: Concept of searching

Concept of searching 

Searching is an operation or a technique that helps finds the place of a given element or value in the list. Any search is said to be successful or unsuccessful depending upon whether the element that is being searched is found or not. Some of the standard searching technique that is being followed in the data structure is listed below:
  • Linear Search or Sequential Search
  • Binary Search

Problem Statement:

You are given an array a[1…n]. There is some ‘k’ for which a[i]=0 for all ‘i’ in the range i = [ k+1, n ]. We want to find this position ‘k’ which splits the group of 0’s and 1’s.
Output:
ADA Exp 1 Output

No comments:

Powered by Blogger.