Count islands using BFS without modifying grid | ByteDance