Count islands using BFS without modifying grid | ByteDance Interview Question