{"id":"lcp-inner-loop-slices","text":"`longest_common_prefix` iterates `strs[1:]` in the inner loop, allocating a new list slice on each outer iteration; a `range(1, len(strs))` index loop would avoid this","truth_value":"IN","source":"entries/2026/06/06/longest-common-prefix-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"lcp-inner-loop-slices","truth_value":"IN","reason":"premise"}]}}