Describe the bug
the BFS impl uses ArrayList as the queue, which is inefficient, specifically the remove(0) line which is O(N). it should use ArrayDeque instead, which would be O(1)
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Device Specification
Additional context
Add any other context about the problem here.