UNPKG

dsa.js

Version:

Data Structures & Algorithms in JS

454 lines (233 loc) 17.6 kB
## [2.7.6](https://github.com/amejiarosario/dsa.js/compare/2.7.5...2.7.6) (2021-11-30) ### Bug Fixes * **graph:** minor typo in bfs code documentation ([ccfcfe6](https://github.com/amejiarosario/dsa.js/commit/ccfcfe6f039ce3f6e289d368fbdbf67e227c168c)), closes [#110](https://github.com/amejiarosario/dsa.js/issues/110) ## [2.7.5](https://github.com/amejiarosario/dsa.js/compare/2.7.4...2.7.5) (2021-05-24) ### Bug Fixes * **bst:** on duplicates values the same node is returned ([d350da8](https://github.com/amejiarosario/dsa.js/commit/d350da8bd2d7cf5c8f4425e863babf19cbdcbdf4)), closes [#99](https://github.com/amejiarosario/dsa.js/issues/99) ## [2.7.4](https://github.com/amejiarosario/dsa.js/compare/2.7.3...2.7.4) (2021-01-09) ### Bug Fixes * **bst:** some typos on the code ([6b9a4e8](https://github.com/amejiarosario/dsa.js/commit/6b9a4e8c00c2082ed7d083b58f7d462e340725fe)) ## [2.7.3](https://github.com/amejiarosario/dsa.js/compare/2.7.2...2.7.3) (2020-12-22) ### Bug Fixes * **book/bst:** better wording ([1d75301](https://github.com/amejiarosario/dsa.js/commit/1d7530199940b926467ad0dcbc3b7dbe76b77820)) * **book/graph:** add comments for runtimes using hashset implementations ([c7c7947](https://github.com/amejiarosario/dsa.js/commit/c7c7947da33cb61a794e538dff55951318edc341)) * **book/hashmap:** exercise example and add tests ([c137930](https://github.com/amejiarosario/dsa.js/commit/c137930a8750c0aac95bbbae931886e068371d92)) ## [2.7.2](https://github.com/amejiarosario/dsa.js/compare/2.7.1...2.7.2) (2020-12-17) ### Bug Fixes * **book:** Rename fibonacci-dynamic-programming ([ded0a70](https://github.com/amejiarosario/dsa.js/commit/ded0a701815ce4647394e2f5e217c0d88142a92c)) ## [2.7.1](https://github.com/amejiarosario/dsa.js/compare/2.7.0...2.7.1) (2020-12-02) ### Bug Fixes * **book:** update company names ([38a4178](https://github.com/amejiarosario/dsa.js/commit/38a4178e69e698a1b3c0d4452f0cfd58aed5290d)) # [2.7.0](https://github.com/amejiarosario/dsa.js/compare/2.6.0...2.7.0) (2020-10-30) ### Bug Fixes * **book/set:** split Set chapter into Hash Set and Tree Set for better ([c1cf57a](https://github.com/amejiarosario/dsa.js/commit/c1cf57a31fc7a698665c82c8fbd2fde7fb825078)) ### Features * **book:** show companies asked questions ([b3167f9](https://github.com/amejiarosario/dsa.js/commit/b3167f9c694c5e6719bf1d01804aeec60b41e57f)) * **book/linkedlist:** add applications ([2b96f00](https://github.com/amejiarosario/dsa.js/commit/2b96f0086632d9ddcbb7e8f76a061a46f90a65a0)) # [2.6.0](https://github.com/amejiarosario/dsa.js/compare/2.5.1...2.6.0) (2020-10-28) ### Bug Fixes * **test:** refactor tests ([571834a](https://github.com/amejiarosario/dsa.js/commit/571834a848d3b4c7d0dd8a94957b73724f3756ac)) ### Features * **book:** add chapter numbers ([0f13f90](https://github.com/amejiarosario/dsa.js/commit/0f13f907141d0ad9bb439d131aca6d1d882421ee)) * **book/linkedlist:** linked lists techniques and common patterns ([8cd126d](https://github.com/amejiarosario/dsa.js/commit/8cd126d71a31473fefdbf0f0a9780cd7b128bcd6)) ## [2.5.1](https://github.com/amejiarosario/dsa.js/compare/2.5.0...2.5.1) (2020-10-23) ### Bug Fixes * **linkedlist:** refactored methods and improve book images and ([ba110e2](https://github.com/amejiarosario/dsa.js/commit/ba110e26b2103265bb78809618c7e29c185acd70)) * **linkedlist:** rename indexOf to getIndex to make it clearer ([fcf3db6](https://github.com/amejiarosario/dsa.js/commit/fcf3db6ade12a7ed88a5b7756945a8b090ac63b9)) # [2.5.0](https://github.com/amejiarosario/dsa.js/compare/2.4.0...2.5.0) (2020-10-22) ### Features * **book/hashmap:** add code examples and patterns ([f7b8d59](https://github.com/amejiarosario/dsa.js/commit/f7b8d59ac8cbddacc34cac6a2f6e0a58419813fd)) # [2.4.0](https://github.com/amejiarosario/dsa.js/compare/2.3.0...2.4.0) (2020-10-19) ### Bug Fixes * **book/array:** improve examples and grammar ([04836cd](https://github.com/amejiarosario/dsa.js/commit/04836cd0cec3afb196d11704a45933e325816c20)) ### Features * **book/array:** add array patterns for solving problems ([8c7b7be](https://github.com/amejiarosario/dsa.js/commit/8c7b7be8fe24ec1df66846b05fbc2ef5daeb6c7e)) * **book/array:** sliding window pattern ([8fa2746](https://github.com/amejiarosario/dsa.js/commit/8fa2746f5c917b0f5a88289d854166210925f9c7)) # [2.3.0](https://github.com/amejiarosario/dsa.js/compare/2.2.1...2.3.0) (2020-10-03) ### Features * **treeMap:** get last entry (highest value) ([249de5d](https://github.com/amejiarosario/dsa.js/commit/249de5d4769549e9f05562bb6dad50d4e0384524)) ## [2.2.1](https://github.com/amejiarosario/dsa.js/compare/2.2.0...2.2.1) (2020-10-02) ### Bug Fixes * **book:** add introduction ([4505eb6](https://github.com/amejiarosario/dsa.js/commit/4505eb64a63b282ca9685b3b2cabb657149d9fe7)) # [2.2.0](https://github.com/amejiarosario/dsa.js/compare/2.1.0...2.2.0) (2020-09-29) ### Features * **book/big-o:** add new chapter on how to determine big o from code. ([68c73d4](https://github.com/amejiarosario/dsa.js/commit/68c73d4c3bb5fb1ec637d81b42a2f8dbfc4f0008)) # [2.1.0](https://github.com/amejiarosario/dsa.js/compare/2.0.0...2.1.0) (2020-09-11) ### Features * **book/sorting:** add questions and solutions ([fdb8bd8](https://github.com/amejiarosario/dsa.js/commit/fdb8bd8af644ddeaa07ce62773e9be96fd6b2404)) # [2.0.0](https://github.com/amejiarosario/dsa.js/compare/1.18.0...2.0.0) (2020-09-08) ### Features * **book/pq:** add exercise with pq and dijkstra ([3a2a24f](https://github.com/amejiarosario/dsa.js/commit/3a2a24ffae2af5e5e348c237195f7a39717ae617)) * **heap:** add error handling for heaps ([827177f](https://github.com/amejiarosario/dsa.js/commit/827177f6023f639db0c2cc267dceb0a27746038a)) * **pq:** improves docs and usability of priority queues ([edf8808](https://github.com/amejiarosario/dsa.js/commit/edf8808970d57aaf397958d2cab1a6cc2e029d26)) ### BREAKING CHANGES * **heap:** size is now an attribute rather than a method. Similar to the built-in Map.size and Set.size # [1.18.0](https://github.com/amejiarosario/dsa.js/compare/1.17.0...1.18.0) (2020-09-07) ### Features * **book/graph:** add schedule exercise and solution ([6a83cf8](https://github.com/amejiarosario/dsa.js/commit/6a83cf8a5d454b26e3048aa4ca73e44eafca0ed3)) # [1.17.0](https://github.com/amejiarosario/dsa.js/compare/1.16.0...1.17.0) (2020-09-04) ### Features * **book/set:** add questions and solutions ([f40dc63](https://github.com/amejiarosario/dsa.js/commit/f40dc6314a14e1750146a19163b3b70c30f09d70)) # [1.16.0](https://github.com/amejiarosario/dsa.js/compare/1.15.0...1.16.0) (2020-09-03) ### Features * **book/hashmap:** add exercises and solutions ([d18186b](https://github.com/amejiarosario/dsa.js/commit/d18186b61c260e3ae2cc1267cadd16c8cb453e00)) # [1.15.0](https://github.com/amejiarosario/dsa.js/compare/1.14.0...1.15.0) (2020-09-02) ### Bug Fixes * **book/solutions:** fix missing solutions ([464417e](https://github.com/amejiarosario/dsa.js/commit/464417e37ccde00d56d8ebb9c0d0ddc9e510e368)) ### Features * **BinaryTreeNode:** add BinaryTreeNode.from ([bcb4c28](https://github.com/amejiarosario/dsa.js/commit/bcb4c28089a96248ab9d623c25e1719e030caedc)) * **book/binary-tree:** add right side view exercise and solution ([28346a4](https://github.com/amejiarosario/dsa.js/commit/28346a448e7f1be640751098b4a954ac04dd0aad)) * **book/bt:** add binary tree diameter problem ([068dd9c](https://github.com/amejiarosario/dsa.js/commit/068dd9cc66e5a3050cc44d4cd3a05eb15f8c00d1)) # [1.14.0](https://github.com/amejiarosario/dsa.js/compare/1.13.0...1.14.0) (2020-08-31) ### Features * **book/questions:** add examples ([c1a8f8e](https://github.com/amejiarosario/dsa.js/commit/c1a8f8ec53f6c4c1302001dba6d913c81156fd98)) * **book/questions:** add where the interview questions have been seen ([1f01baf](https://github.com/amejiarosario/dsa.js/commit/1f01bafdb55dcd82f6b88bdf1252c5aabb39277a)) * **book/queue:** add recent counter questions and solution ([77d4596](https://github.com/amejiarosario/dsa.js/commit/77d459642ca61f729e698c892928665e76532701)) * **book/queue:** add solution for queue question ([9a88766](https://github.com/amejiarosario/dsa.js/commit/9a887660bd21e7dbda0d3e87af704b4e41874093)) * **queue:** add front, back and peek methods ([04aa9db](https://github.com/amejiarosario/dsa.js/commit/04aa9db26659058c09debe985f94845933a2089d)) # [1.13.0](https://github.com/amejiarosario/dsa.js/compare/1.12.0...1.13.0) (2020-08-26) ### Features * **book/exercises:** interview q&a for linked lists and stacks ([3bb86fd](https://github.com/amejiarosario/dsa.js/commit/3bb86fd544f543906b5723aab1f26d5a75f13950)) # [1.12.0](https://github.com/amejiarosario/dsa.js/compare/1.11.0...1.12.0) (2020-08-26) ### Features * **book/exercises:** interview q&a for linked lists and stacks ([#69](https://github.com/amejiarosario/dsa.js/issues/69)) ([ca4bf45](https://github.com/amejiarosario/dsa.js/commit/ca4bf45369ef772f4861e7619d3ea74ddc41cde4)) ### Reverts * Revert "(book/exercises): interview q&a for linked lists and stacks (#69)" (#70) ([06bd3f6](https://github.com/amejiarosario/dsa.js/commit/06bd3f6a8542b111e4c9e3b5d41050094b153112)), closes [#69](https://github.com/amejiarosario/dsa.js/issues/69) [#70](https://github.com/amejiarosario/dsa.js/issues/70) # [1.11.0](https://github.com/amejiarosario/dsa.js/compare/1.10.0...1.11.0) (2020-08-22) ### Bug Fixes * **book:** multiple broken links and bump epub version ([57960e2](https://github.com/amejiarosario/dsa.js/commit/57960e2c4f483e779e8344e07406ce7d67d4d9b8)), closes [#60](https://github.com/amejiarosario/dsa.js/issues/60) * **book:** workaround for c++ issue in asciidoc ([dbdef21](https://github.com/amejiarosario/dsa.js/commit/dbdef2141ac1449c649cc76790d7990374e78808)) ### Features * **book:** add appendix D with interview question solutions ([ca119f2](https://github.com/amejiarosario/dsa.js/commit/ca119f2b2fe5e4392a0b13278b5a6ba9e907952c)) * **book:array:** add solutions for interview questions ([b5a00dd](https://github.com/amejiarosario/dsa.js/commit/b5a00dded45a1f4eeab3bbbdd68ccbcbf02419d3)) * **book/array:** add max subarray questions and solution ([5935b95](https://github.com/amejiarosario/dsa.js/commit/5935b95ea761402b296e5a4fbd6e3643714bcaf9)) * **book/array:** add stock questions and solution ([6ab8bc4](https://github.com/amejiarosario/dsa.js/commit/6ab8bc4449323b059888edf84d66c76c9e812f4e)) # [1.10.0](https://github.com/amejiarosario/dsa.js/compare/1.9.0...1.10.0) (2020-07-28) ### Features * **book/arrays:** add exercises ([bcaf819](https://github.com/amejiarosario/dsa.js/commit/bcaf81919cb889c1209c6d1e577b037047714c05)) # [1.9.0](https://github.com/amejiarosario/dsa.js/compare/1.8.3...1.9.0) (2020-06-30) ### Features * **heap:** remove by index ([6af937f](https://github.com/amejiarosario/dsa.js/commit/6af937fb380ffcd26558193c1626bdb84b2abe17)) * **linkedList:** takes iterables in the constructor ([1fa875f](https://github.com/amejiarosario/dsa.js/commit/1fa875fd772eb4a45dd9690bea593b513687caca)) ## [1.8.3](https://github.com/amejiarosario/dsa.js/compare/1.8.2...1.8.3) (2020-05-24) ### Bug Fixes * **book/maps:** update space complexity ([0be0176](https://github.com/amejiarosario/dsa.js/commit/0be0176efc121c5608c1a2df25280d6d9c08e6f3)) ## [1.8.2](https://github.com/amejiarosario/dsa.js/compare/1.8.1...1.8.2) (2020-05-24) ### Bug Fixes * **book/hashset:** update hashset space complexity ([0319b29](https://github.com/amejiarosario/dsa.js/commit/0319b29e92a630c5f14d5e3208b72fe536b38f43)) ## [1.8.1](https://github.com/amejiarosario/dsa.js/compare/1.8.0...1.8.1) (2020-05-24) ### Bug Fixes * **book/maps:** update time/space complexity values ([3c4ef75](https://github.com/amejiarosario/dsa.js/commit/3c4ef7555c400828fb89339184294feb7169b215)) # [1.8.0](https://github.com/amejiarosario/dsa.js/compare/1.7.1...1.8.0) (2020-05-23) ### Bug Fixes * **book/map:** fix typo on maps space complexity ([2f24f57](https://github.com/amejiarosario/dsa.js/commit/2f24f57f989bb97f198bb32f6daa477d6075dc31)) * **hashmap:** improve methods documentation ([f6b47b5](https://github.com/amejiarosario/dsa.js/commit/f6b47b5a6c53126bebbad72ac92da1a594042232)) ### Features * **maps:** implement clear method for hashMap and treeMap ([924c9a7](https://github.com/amejiarosario/dsa.js/commit/924c9a76db91f7df44f7cb38caba3aa9c3f0497f)) ## [1.7.1](https://github.com/amejiarosario/dsa.js/compare/1.7.0...1.7.1) (2020-05-20) ### Bug Fixes * **hashmap:** fix TextEncoder reference ([e13ff88](https://github.com/amejiarosario/dsa.js/commit/e13ff88d7f8f9b7f38844befedc001bc1a4b243f)) # [1.7.0](https://github.com/amejiarosario/dsa.js/compare/1.6.0...1.7.0) (2020-05-16) ### Features * **heap:** add min/max/median-heaps ([202ca9f](https://github.com/amejiarosario/dsa.js/commit/202ca9f989ddba433b4f591e27bc094640cbbadf)) # [1.6.0](https://github.com/amejiarosario/dsa.js/compare/1.5.0...1.6.0) (2020-05-08) # [1.5.0](https://github.com/amejiarosario/dsa.js/compare/1.4.0...1.5.0) (2020-03-30) ### Features * **linkedList:** remove by node ([eac045a](https://github.com/amejiarosario/dsa.js/commit/eac045a6bedd0223a2e8b12225f87c428e6fb66f)) * **lru-cache:** add new implementations ([3e787c6](https://github.com/amejiarosario/dsa.js/commit/3e787c6f9ba9c094272be5ac05b997ce44a359d3)) * **trie:** remove method ([16005f3](https://github.com/amejiarosario/dsa.js/commit/16005f3bf39597759918e34b39d27eb25a5755e7)) # Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) ## [1.3.9] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(book): fix table typos [commit](https://github.com/amejiarosario/dsa.js/commit/bc51a7a0c97aea9dea1afa5f8af22c0bed1382d3) ## [1.3.8] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(book): fix typo, array pop, and BST images [commit](https://github.com/amejiarosario/dsa.js/commit/ac9858348943f9678d116c8076bfa3a3c5362741) ## [1.3.7] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(avl-tree): balance was not working properly [commit](https://github.com/amejiarosario/dsa.js/commit/98e2c037f05caf37731da1dc50dd8867a1804c0e) ## [1.3.6] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - update deps [commit](https://github.com/amejiarosario/dsa.js/commit/d8ce2f5b1a3bfeb861928d6c99d7624cd9ac144a) - style: fix eslint issue [commit](https://github.com/amejiarosario/dsa.js/commit/72e3d68e09bb9c7dd3fabf5cbeba1ae5571fc686) ## [1.3.5] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(tree-rotations): prevent losing nodes [commit](https://github.com/amejiarosario/dsa.js/commit/1fa93415a6e14acc24e90443b2e9bdf053c4c983) ## [1.3.4] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(queue): runtime error [commit](https://github.com/amejiarosario/dsa.js/commit/fd3ab480f2bb7cc2b7ce45da4e6a41831eafb7bf) - fix(book): remove lorem ipsum [commit](https://github.com/amejiarosario/dsa.js/commit/6a06e3b75915a72ef0dd5ee9d37dcf434c4c8e18) - docs(book): improve grammar ## [1.2.3] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(linkedlist): removeFirst's last reference [commit](https://github.com/amejiarosario/dsa.js/commit/d4f9a71f6a22971ad8edcfd982d6b113f627d108) ## [1.2.2] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - Optimize NPM package ## [1.2.1] ### Breaking Changes (major) ### New Features (minor) ### Bug Fixes (patch) - fix(linked-list): insert in the middle bug [commit](https://github.com/amejiarosario/dsa.js/commit/f8bd4fd8fa6c8dcb0d26f54a6ed7d80e5443d65b) - Various docs fixes. ## [1.2.0] - 2019-04-04 ### Breaking changes (major) ### New Features (minor) - Added Eslint and Travis ci ### Fixes (patch) - Readme improvements - Badges for npm versions and build status ## [1.1.0] - 2019-03-29 ### Added - README.md added because NPM packages doesn't read README.adoc - Public API to use the package `dsa.js` - This changelog ### Changed - Updated dependencies (removed lodash since is not needed) ### Removed - ## [1.0.0] - 2019-03-29 ### Added - Started the project - Book released - npm package published ### Changed - ### Removed - [Unreleased]: https://github.com/amejiarosario/dsa.js/compare/1.3.9...HEAD [1.3.9]: https://github.com/amejiarosario/dsa.js/compare/1.3.8...1.3.9 [1.3.7]: https://github.com/amejiarosario/dsa.js/compare/1.3.7...1.3.8 [1.3.6]: https://github.com/amejiarosario/dsa.js/compare/1.3.6...1.3.7 [1.3.6]: https://github.com/amejiarosario/dsa.js/compare/1.3.5...1.3.6 [1.3.5]: https://github.com/amejiarosario/dsa.js/compare/1.3.4...1.3.5 [1.3.4]: https://github.com/amejiarosario/dsa.js/compare/1.2.3...1.3.4 [1.2.2]: https://github.com/amejiarosario/dsa.js/compare/1.2.2...1.2.3 [1.2.2]: https://github.com/amejiarosario/dsa.js/compare/1.2.1...1.2.2 [1.2.1]: https://github.com/amejiarosario/dsa.js/compare/1.2.0...1.2.1 [1.2.0]: https://github.com/amejiarosario/dsa.js/compare/1.1.0...1.2.0 [1.1.0]: https://github.com/amejiarosario/dsa.js/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/amejiarosario/dsa.js/releases/tag/1.0.0