{"id":"pad-then-slice-idiom","text":"divide-a-string normalizes input length before slicing rather than special-casing the last group — `(k - len(s) % k) % k` computes minimal padding, and uniform stride-k slicing produces all groups.","truth_value":"IN","source":"entries/2026/06/06/divide-a-string-into-groups-of-size-k-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"pad-then-slice-idiom","truth_value":"IN","reason":"premise"}]}}