Hacker News new | ask | show | jobs
by jmd42 1206 days ago
> Why not ask the much more interesting and potentially useful question of balancing a binary tree?

Honestly? Because that's harder.

The swapping question is basically a softball / FizzBuzz-style question to test the most basic familiarity with data structures, pointers/references, and recursion.