Binary Search

Halving a sorted search space each step.

2 subjects · 2 topics · 2 cheatsheets

Subjects covering this category

2 subjects
  • Subject · Intermediate to Advanced

    Tracing, implementing and proving the cost of the classic searching, sorting and graph algorithms, and designing new ones with divide and conquer, backtracking, greedy choice and dynamic programming, in Python, Java and TypeScript.

    • Searching and Simple Sorting
    • Efficient Sorting
    • Design Strategies
    19 topics · 168 cardsnot started
  • Subject · Intermediate to Advanced

    Recognising which of the common problem-solving patterns an unseen coding problem needs, and solving it in Python, Java or TypeScript within the time an interview allows.

    • Approach
    • Array and Number Patterns
    • Linked List Patterns
    17 topics · 135 cardsnot started

Cheatsheets

2 cheatsheets
  • Cheatsheet · Algorithms

    Binary search and the three simple sorts on one page: when each fits, what it costs, and the Python to write it.

    2 entries here
  • Cheatsheet · Coding Interview Patterns

    Fourteen coding interview patterns on one page: the property that points to each, what it costs, when it fails, and its loop in Python.

    1 entry here

In Binary Search itself

2 topics
  • Algorithms

    Binary search: finding a value in a sorted array by halving the range at every step, with the invariant, the midpoint and the boundaries that make it correct.

    Intermediate9 cards · 5 qnot started

  • Coding Interview Patterns

    Modified binary search: binary search on a condition instead of a value, on a rotated array, and over the possible answers to a problem.

    Intermediate to Advanced8 cards · 4 qnot started