Algorithms and Data Structures - FreeCodeCamp

3 flashcards · Computer Science · by charlie42

  1. Visualize binary search

  2. Complexity of binary search

    O(log N)

  3. Explain the complexity of binary search

    We divide the array of N in two until we get a single value log2N means "how many times I can divide N by 2 to get 1?" E.g. for log 2 8 = 3: How many times can we divide 8 by 2 to get the value 1?