Binary Search on the Answer: One Template for Dozens of Problems | Codekra