Question


Which algorithm computes using at most log, (length of list) amount of iterations? Min Search Binary Search O Sequential Sear
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:Binary Search

Binary Search:It is a searching technique used on Sorted data only.In which at each iteration it compares the key value(value we are searching for) with mid value of the List.And Chop of the List into two parts.And Choose one of the part and Continue searching based on the conditions.

Consider a List with N elements list[1,N] and we are searching for a value K in it.

  • if key== list[mid] return found //stop
  • else if(key<list(mid)) list=list[1,mid-1] //choose the 1st half
  • else if(key>list(mid)) list=list[mid+1,N] //choose the 2nd half

At each iteration the it cut the List into half.

It time Complexity is O(log2(n))(read as Big O of log N) where n is the Length of the List.

The Time Complexity represents the at most Iterations required to search the Value.

Binary Search is also Called as Half Interval Search,Binary Chop,Logarithmic Search.

Sequential Search:

It is searching technique which is used mostly on unsorted data.In this it compares each and every value of the List with Key(value we are searching).It is very inefficient searching technique which is used in unsorted data.

It is also called as Linear Search.

It's Time Complexity is O(n) (read as Big O of N) where n is the Length of the List.The Time Complexity represents the at most Iterations required to search the Value.

If You Have Any Doubts Please Ask Using Comments.

Have A Great Day!

Add a comment
Know the answer?
Add Answer to:
Which algorithm computes using at most log, (length of list) amount of iterations? Min Search Binary...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT