-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
I'm not sure how time-consuming this step is, so not sure if it is negligible:
But you are storing the things you want to process in an ArrayList, but you're iteratively removing from the front of the ArrayList, which is O(n) each time (where n is the number of elements in the ArrayList). You should use a Queue (which is implemented as a LinkedList) for O(1) removal from the front, given that you don't care about random access of elements
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels