Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/datastructure/linkedList/singly/helper.d.ts

Implement different Data Structures using TypeScript. Deno Third-party Module.
Latest
File

// data typeexport type DataType<T> = { key: string|number value: T}
// singly linked list node classexport type NodeType = { data: DataType<any> next: null|NodeType}|null
// singly linked list interfaceexport interface LinkedListApi { size: number; prepend(data: DataType<any>): boolean; append(data: DataType<any>): boolean; add(data: DataType<any>, position: number): boolean; getFromHead(): object|false; getFromTail(): object|false; log(): void; remove(key: string|number): boolean; update(key: string|number, newValue: any): object|boolean; search(key: string|number): object|boolean iterator(): Generator}