Binary Search Log Entries by Date String

Asked at Pinterest · Coding Questions · Difficulty: Easy · Last asked Mar 28, 2026

Given a list of log entries timestamped as date strings, find the entry corresponding to a target date via binary search. Recent variants extend to violation-log counting where the first part is a hashmap pass and the second part needs binary search on a sorted timestamp array.

Loading the problem…