1
0
mirror of https://github.com/robonen/tools.git synced 2026-03-20 10:54:44 +00:00

feat(core/stdlib): implement LinkedList, PriorityQueue, and Queue data structures

This commit is contained in:
2026-02-15 02:36:41 +07:00
parent 09fe8079c0
commit 7b5da22290
37 changed files with 4532 additions and 14 deletions

View File

@@ -1,5 +1,8 @@
import { last } from '../../arrays';
import { isArray } from '../../types';
import type { StackLike } from './types';
export type { StackLike } from './types';
export interface StackOptions {
maxSize?: number;
@@ -14,7 +17,7 @@ export interface StackOptions {
*
* @template T The type of elements stored in the stack
*/
export class Stack<T> implements Iterable<T>, AsyncIterable<T> {
export class Stack<T> implements StackLike<T> {
/**
* The maximum number of elements that the stack can hold
*