{"_id":"@delgadillox/ds-lib","_rev":"4-8d385644a87c6cc9c01e35027b44250b","name":"@delgadillox/ds-lib","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@delgadillox/ds-lib","version":"0.0.1","license":"MIT","_id":"@delgadillox/ds-lib@0.0.1","maintainers":[{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"}],"dist":{"shasum":"42b286482db929d6e86ce447f4105d19712b6aa7","tarball":"https://registry.npmjs.org/@delgadillox/ds-lib/-/ds-lib-0.0.1.tgz","fileCount":5,"integrity":"sha512-i83lU7NhqI02+UXGB4+ufdFE8XqN3aFWm2SS1OcJXCYqBK2krhGdBWqxaHlUuIUTDRglCm37z033osdM4T8xng==","signatures":[{"sig":"MEUCIC4c0rDykCw6QVPSMmxTRFo/HzNAvVqkeW9Bc9xDhIQxAiEAs9lMjMZynfBVH2Kn2j+zk8GkPO+KVobLGXCf9A6s7j4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57868},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"37a4bc66cbaa223e986d0a9236af89a0029394ea","scripts":{"docs":"typedoc","test":"jest","build":"tsup src/index.ts --dts --format cjs,esm --clean","@delgadillox/agent":"file:../agent"},"_npmUser":{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"},"_npmVersion":"11.6.0","description":"Data structures in TypeScript (LinkedList, Trees, Graphs...).","directories":{},"_nodeVersion":"23.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typedoc":"^0.28.13","typescript":"^5.9.2","typedoc-plugin-markdown":"^4.8.1"},"_npmOperationalInternal":{"tmp":"tmp/ds-lib_0.0.1_1758599676843_0.4358712711801198","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@delgadillox/ds-lib","version":"0.0.2","license":"MIT","_id":"@delgadillox/ds-lib@0.0.2","maintainers":[{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"}],"dist":{"shasum":"d8a3c16e4579aef03b8aea8788fa2eaa23046e50","tarball":"https://registry.npmjs.org/@delgadillox/ds-lib/-/ds-lib-0.0.2.tgz","fileCount":5,"integrity":"sha512-PkJc/9IzYGRp2Zf3AFJHDHOlBq0uF8XQLoPGdTOZ/FzFn9A2BsBhQhhj9tUTOJuN6JygUBkP+KSxmblsWyHfEg==","signatures":[{"sig":"MEQCIEzBFXREFwBhNVHCZiVCF6YQ/NonVaAA8L7Xje6Qsm72AiA6Ffvlbu9K591G/rHmR5G57zxry5AVhxE5WEfmQEyIAA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57868},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"dfb39a807683386cff4820578e5b5706b01163e6","scripts":{"docs":"typedoc","test":"jest","build":"tsup src/index.ts --dts --format cjs,esm --clean","@delgadillox/agent":"file:../agent"},"_npmUser":{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"},"_npmVersion":"11.6.0","description":"Data structures in TypeScript (LinkedList, Trees, Graphs...).","directories":{},"_nodeVersion":"23.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typedoc":"^0.28.13","typescript":"^5.9.2","typedoc-plugin-markdown":"^4.8.1"},"_npmOperationalInternal":{"tmp":"tmp/ds-lib_0.0.2_1758600860855_0.6395721544647639","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@delgadillox/ds-lib","version":"0.0.3","license":"MIT","_id":"@delgadillox/ds-lib@0.0.3","maintainers":[{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"}],"dist":{"shasum":"7f50ff50e88195570fe683519e64c35aca0fd228","tarball":"https://registry.npmjs.org/@delgadillox/ds-lib/-/ds-lib-0.0.3.tgz","fileCount":6,"integrity":"sha512-VqkJBmPfDkoNU8rNNPxWAYP5XmF6LdIEr6oOxHS7ysahB1AH7IZhFC9yQcsKpXZJb2s77aZVZnbjNcBgg77W2g==","signatures":[{"sig":"MEYCIQCv1t34rOourOTFZqdC0Uzqp4vEzJChYIlHrttkrOJGIgIhAI7l+chAYG2b6rnTiRCOcRg1FDJbx0ElNOtrqJAagDO/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59999},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"94e34a50bdbb9e5d9676d98d54c2453805eff224","scripts":{"docs":"typedoc","test":"jest","build":"tsup src/index.ts --dts --format cjs,esm --clean","@delgadillox/agent":"file:../agent"},"_npmUser":{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"},"_npmVersion":"11.6.0","description":"Data structures in TypeScript (LinkedList, Trees, Graphs...).","directories":{},"_nodeVersion":"23.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typedoc":"^0.28.13","typescript":"^5.9.2","typedoc-plugin-markdown":"^4.8.1"},"_npmOperationalInternal":{"tmp":"tmp/ds-lib_0.0.3_1758601175551_0.9799902891433543","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@delgadillox/ds-lib","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Delgadillox/ds-copilot.git"},"homepage":"https://github.com/Delgadillox/ds-copilot#readme","bugs":{"url":"https://github.com/Delgadillox/ds-copilot/issues"},"version":"0.0.4","description":"Data structures in TypeScript (LinkedList, Trees, Graphs...).","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs","types":"./dist/index.d.ts"}},"scripts":{"build":"tsup src/index.ts --dts --format cjs,esm --clean","docs":"typedoc","@delgadillox/agent":"file:../agent","test":"jest"},"license":"MIT","devDependencies":{"tsup":"^8.5.0","typedoc":"^0.28.13","typedoc-plugin-markdown":"^4.8.1","typescript":"^5.9.2"},"_id":"@delgadillox/ds-lib@0.0.4","gitHead":"94e34a50bdbb9e5d9676d98d54c2453805eff224","_nodeVersion":"23.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-e3Dt3Myl1zr0B/3PvjS+0Yvhxhb7RFYbJoOkM6WkPiTzi/U33LEuOlwElU31K5VvDS9LMpgjbjpo+/3PAyqhrw==","shasum":"7535d1092f250d05f99f210ebb49a7f6b9594c9a","tarball":"https://registry.npmjs.org/@delgadillox/ds-lib/-/ds-lib-0.0.4.tgz","fileCount":6,"unpackedSize":60257,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCsty7uqly7e0mRTUO6DvD20sHptxL7b/vu3/CDjCYZxQIgCpK7/WJQJsKBDHcyBzf0NkplYpvXBuW9KYU2klQXz48="}]},"_npmUser":{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"},"directories":{},"maintainers":[{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ds-lib_0.0.4_1758601232891_0.5277424671631192"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-23T03:54:36.751Z","modified":"2025-09-23T04:20:33.284Z","0.0.1":"2025-09-23T03:54:37.028Z","0.0.2":"2025-09-23T04:14:21.041Z","0.0.3":"2025-09-23T04:19:35.720Z","0.0.4":"2025-09-23T04:20:33.103Z"},"license":"MIT","description":"Data structures in TypeScript (LinkedList, Trees, Graphs...).","maintainers":[{"name":"delgadillox","email":"josepablodelgadillo@gmail.com"}],"readme":"# @delgadillox/ds-lib\r\n\r\nMinimal TypeScript data structures and helpers you can actually use in real code:\r\n**Singly Linked List**, **Doubly Linked List**, **Stack**, **Queue**, plus small algorithms\r\n(reverse list, cycle detection) and builders from arrays.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm i @delgadillox/ds-lib\r\n```\r\n\r\n## Quick usage\r\n\r\n```bash\r\nimport {\r\nLinkedList, DoublyLinkedList, Stack, Queue,\r\nreverseLinkedList, hasCycle,\r\nbuildLinkedListFromArray, buildQueueFromArray\r\n} from '@delgadillox/ds-lib';\r\n\r\n// Doubly Linked List\r\n\r\nconst dl = new DoublyLinkedList<number>();\r\n\r\ndl.addFirst(2); dl.addLast(3); // [2, 3]\r\n\r\ndl.removeFirst(); // 2\r\n\r\n// Singly Linked List + algorithms\r\n\r\nconst ll = buildLinkedListFromArray([1,2,3]); // 1 -> 2 -> 3\r\n\r\nreverseLinkedList(ll); // 3 -> 2 -> 1\r\n\r\nhasCycle(ll); // false\r\n\r\n// Stack / Queue\r\n\r\nconst s = new Stack<number>(); s.push(10); s.push(20); s.pop(); // 20\r\n\r\nconst q = buildQueueFromArray(['a','b']); q.dequeue(); // 'a'\r\n```\r\n\r\n## Big-O (core ops)\r\n\r\n| Structure           | Method                | BIG O    |\r\n| ------------------- | --------------------- | -------- |\r\n| LinkedList (singly) | addFirst / shift      | O(1)     |\r\n| LinkedList (singly) | addLast               | O(1)     |\r\n| LinkedList (singly) | removeLast (pop)      | **O(n)** |\r\n| DoublyLinkedList    | add/remove first/last | O(1)     |\r\n| Stack (doble)       | push/pop/peek         | O(1)     |\r\n| Queue (doble)       | enqueue/dequeue/peek  | O(1)     |\r\n\r\nNotes: singly removeLast is O(n) by design. Use DoublyLinkedList for O(1) head/tail removals.\r\n\r\n## Exports\r\n\r\nLinkedList<T> (singly), DoublyLinkedList<T>\r\n\r\nStack<T>, Queue<T>\r\n\r\nAlgorithms: reverseLinkedList, reverseDoublyLinkedList, hasCycle, findCycleStart\r\n\r\nBuilders: buildLinkedListFromArray, buildDoublyLinkedListFromArray, buildStackFromArray, buildQueueFromArray\r\n\r\n## Roadmap\r\n\r\nMore data structures & algorithms are planned:\r\nBinary Search, Binary Tree/BST, Graphs, Sorting (merge/quick), BFS/DFS, shortest paths, and more list utilities.\r\n\r\n## Docs\r\n\r\nGenerated API docs (TypeDoc) live under packages/ds-lib/docs/ in this repo.\r\n","readmeFilename":"README.md","homepage":"https://github.com/Delgadillox/ds-copilot#readme","repository":{"type":"git","url":"git+https://github.com/Delgadillox/ds-copilot.git"},"bugs":{"url":"https://github.com/Delgadillox/ds-copilot/issues"}}