Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@imran001/arraytolinkedlist) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
About
This is a simple utility to convert an array to a linked list and vice versa.
Usage
import {
arrayToLinkedList,
linkedListToArray,
} from "@imran001/arraytolinkedlist";
const arr = [1, 2, 3, 4, 5];
const head = arrayToLinkedList(arr);
const result = linkedListToArray(head);
console.log(head); // Output: ListNode { val: 1, next: ListNode { val: 2, next: ListNode { val: 3, next: ListNode { val: 4, next: ListNode { val: 5, next: null } } } } }
console.log(result); // Output: [ 1, 2, 3, 4, 5 ]
Hire Me
Want to work with a kickass frontend dev?
Email me at ikhan77727@gmail.com. LinkedIn: https://www.linkedin.com/in/imrankhan001/
P.S: I excel in Remote Work Only