You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the vec implementation uses a bitvec to keep track of which elements are present/removed. By doing so, we can remove elements in constant time instead of $O(n)$.
However, we might want to consider having a minimal occupancy rate, such as 50%. When this threshold is no longer met, the elements could be shifted to the front. While this operation would be of linear time complexity, the amortised cost would still be $O(1)$.
The text was updated successfully, but these errors were encountered:
Currently, the$O(n)$ .
vec
implementation uses abitvec
to keep track of which elements are present/removed. By doing so, we can remove elements in constant time instead ofHowever, we might want to consider having a minimal occupancy rate, such as 50%. When this threshold is no longer met, the elements could be shifted to the front. While this operation would be of linear time complexity, the amortised cost would still be$O(1)$ .
The text was updated successfully, but these errors were encountered: