Question
Given two strings s and t (each length 0..1000), return the number of distinct subsequences of s that equal t. A subsequence is formed by deleting zero or more characters without changing the order of the remaining ones; two subsequences are distinct if they use different sets of index positions. The empty string is a subsequence of any string. Return an integer.
num_distinct(s: str, t: str) → int["rabbbit","rabbit"]out3State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.