2 ms·
Anecdotally, I've never used or seen anyone use a pure NxN grid. It's always a series of horizontal or vertical splits (a tree). I'll admit that this being Rus
by von_lohengramm 5y ago
Anecdotally, I've never used or seen anyone use a pure NxN grid. It's always a series of horizontal or vertical splits (a tree).
I'll admit that this being Rust is likely the cause, but this is a simple binary tree. There's no need for backpointers or any troublesome algorithms or anything.
It's just a tad annoying that Rust pushes people towards crappy solutions by making the better solution _spooky and dangerous_ when said solution doesn't even involve the _spooky and dangerous_ `unsafe` keyword.