subject
Engineering, 06.11.2019 20:31 Onlyoneeniyaaa

Two algorithms for searching arrays, called linear search and binary search, were discussed in the lectures. the linear search algorithm did only one comparison per iteration, but it needed many iterations. the binary search algorithm did more than one comparison per iteration, but it needed few iterations. as a result, linear search should be more efficient than binary search for small arrays, and binary search should be more efficient than linear search for large arrays. how big must an array be before binary search becomes more efficient than linear search? you will determine this experimentally.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:10
What difference(s) did you notice using a pneumatic circuit over hydraulic circuit.explain why the pneumatic piston stumbles when it hits an obstacle.
Answers: 2
question
Engineering, 04.07.2019 18:10
During a steady flow process, the change of energy with respect to time is zero. a)- true b)- false
Answers: 2
question
Engineering, 04.07.2019 18:10
The higher the astm grain-size number, the coarser the grain is. a)-true b)-false
Answers: 3
You know the right answer?
Two algorithms for searching arrays, called linear search and binary search, were discussed in the l...
Questions
question
History, 15.07.2019 13:20
question
Mathematics, 15.07.2019 13:20
question
Mathematics, 15.07.2019 13:20
Questions on the website: 13722361