Binary Search, Bits and Maths
Halve the search space on sorted data and answers, and use bit tricks and number theory to keep arithmetic fast.
- 01
Binary Search
- easy
- Code
- 02
Floor of a Square Root
- easy
- Code
- 03
Single Number
- easy
- Code
- 04
Count the Bits
- easy
- Code
- 05
Power of Two
- easy
- Code
- 06
Greatest Common Divisor and LCM
- easy
- Code
- 07
Search a Rotated Sorted Array
- medium
- Code
- 08
First and Last Index
- medium
- Code
- 09
Search a 2D Matrix
- medium
- Code
- Pro
- 10
Koko Eating Bananas
- medium
- Code
- Pro
- 11
Count Primes Below N
- medium
- Code
- 12
Fast Power Modulo
- medium
- Code