Monday, December 1, 2014

Linear and Binary Search Algorithms

It takes 6 digits to represent the number 32 in binary

2^nth

Linear search is different from binary because linear makes you go one by one and binary allows you to be able to save time by going through sections at a time and halving your search, eliminating many parts at once. Linear would be better when something you're looking for isn't in order or when it's int the beginning of the list.

No comments:

Post a Comment