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 both StrictStack and StrictQueue use an amortized O(1) time cost and O(1) space cost for their sizes. If StrictStack could gain an O(1) time/space complexity, and if StrictQueue delegated to StrictStack, it would achieve the same complexity. This should be doable with a single additional wrapper node in StrictStack that was carried the size along with the spine.
The text was updated successfully, but these errors were encountered:
Currently both
StrictStack
andStrictQueue
use an amortizedO(1)
time cost andO(1)
space cost for their sizes. IfStrictStack
could gain anO(1)
time/space complexity, and ifStrictQueue
delegated toStrictStack
, it would achieve the same complexity. This should be doable with a single additional wrapper node inStrictStack
that was carried the size along with the spine.The text was updated successfully, but these errors were encountered: