applejacks
Custom Made Collection
less efficient than what? I'm driving now but I'm pretty sure, if you implement your code as is, insert 5 players in a given order then remove the middle one and add it back in and look at the order of your players. then add the exact same 5 players in a different order, remove the middle and add it back at the end. you'll see the order of the list of your players is the same
103 replies
Custom Made Collection
you want to use a queue with remove at functionality, I'd implement a class that internally has a queue and, when remove at is called in my class, turn the queue into an array to get how many items exist after the index to be removed, dequeue them to a local var, dequeue the one i don't want and requeue them.
103 replies