{"id":"counting-beats-sorting-for-single-target","text":"When a problem asks for indices of a single target value in a sorted array, counting elements less-than and equal-to the target gives O(n) time vs O(n log n) for actually sorting, since equal elements are always contiguous in sorted order.","truth_value":"IN","source":"entries/2026/06/06/find-target-indices-after-sorting-array-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"counting-beats-sorting-for-single-target","truth_value":"IN","reason":"premise"}]}}