{"id":"buddy-strings-equal-case-duplicate-check","text":"When `s == goal`, `buddyStrings` returns `True` only if `s` contains a duplicate character (`len(s) != len(set(s))`), because swapping two copies of the same character is the only valid \"swap that produces the same string.\"","truth_value":"IN","source":"entries/2026/06/06/buddy-strings-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"buddy-strings-equal-case-duplicate-check","truth_value":"IN","reason":"premise"}]}}