TypeScript strengths
- Discriminated unions clean up graph/tree traversal with node variants.
- Generics on heap / trie / linked-list implementations read closer to pseudocode than JS.
- The type checker catches off-by-one and nullability bugs mid-keystroke.