mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-12-08 19:06:00 +00: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.