Skip to content

CodeBuddyUltra/binaryvslinear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BinaryVsLinear

Aim

Finding out who is faster among binary and linear search method

Materials Required

A large randomly generated array containing number

Observation

For elements inside the list

Enter the number to be searched: 983
Element has been found
Time taken in binary search= 0.0
Number found
Time taken in linear search= 0.03061676025390625

For element outside the list

Enter the number to be searched: 1051
Element has not been entered
Time taken in binary search= 0.0
Number not found
Time taken in linear search= 0.048163652420043945

Conclusion

Binary search method is more faster and efficient than linear search

About

Binary search vs linear search: Who is faster?

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages