fn expand(walls: &[u32], frontier: &mut [u32]) -> bool
Use bitwise logic to expand the frontier. Returns a boolean indicating if the frontier actually expanded.