mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
* By definition Stack push/pop time complexity should be O(1). * Fix is applied by removing head instead of tail in pop method. * Push method now do preprend instead of append. * Fix consistency between toString and toArray methods.
1.6 KiB
1.6 KiB