max-priority-queue-typed 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/cjs/index.cjs +104 -55
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs-legacy/index.cjs +103 -54
  4. package/dist/cjs-legacy/index.cjs.map +1 -1
  5. package/dist/esm/index.mjs +104 -56
  6. package/dist/esm/index.mjs.map +1 -1
  7. package/dist/esm-legacy/index.mjs +103 -55
  8. package/dist/esm-legacy/index.mjs.map +1 -1
  9. package/dist/types/common/error.d.ts +9 -0
  10. package/dist/types/common/index.d.ts +1 -1
  11. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +36 -0
  12. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +42 -0
  13. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +77 -2
  14. package/dist/types/data-structures/binary-tree/bst.d.ts +171 -0
  15. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +57 -0
  16. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +18 -0
  17. package/dist/types/data-structures/binary-tree/tree-map.d.ts +409 -0
  18. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +411 -6
  19. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +339 -6
  20. package/dist/types/data-structures/binary-tree/tree-set.d.ts +391 -0
  21. package/dist/types/data-structures/graph/directed-graph.d.ts +30 -0
  22. package/dist/types/data-structures/graph/undirected-graph.d.ts +27 -0
  23. package/dist/types/data-structures/hash/hash-map.d.ts +33 -0
  24. package/dist/types/data-structures/heap/heap.d.ts +42 -0
  25. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +51 -0
  26. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +45 -0
  27. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +54 -0
  28. package/dist/types/data-structures/matrix/matrix.d.ts +24 -0
  29. package/dist/types/data-structures/queue/deque.d.ts +45 -0
  30. package/dist/types/data-structures/queue/queue.d.ts +36 -0
  31. package/dist/types/data-structures/stack/stack.d.ts +30 -0
  32. package/dist/types/data-structures/trie/trie.d.ts +36 -0
  33. package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
  34. package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
  35. package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
  36. package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
  37. package/dist/umd/max-priority-queue-typed.js +101 -53
  38. package/dist/umd/max-priority-queue-typed.js.map +1 -1
  39. package/dist/umd/max-priority-queue-typed.min.js +1 -1
  40. package/dist/umd/max-priority-queue-typed.min.js.map +1 -1
  41. package/package.json +2 -2
  42. package/src/common/error.ts +19 -1
  43. package/src/common/index.ts +1 -1
  44. package/src/data-structures/base/iterable-element-base.ts +3 -2
  45. package/src/data-structures/binary-tree/avl-tree.ts +47 -0
  46. package/src/data-structures/binary-tree/binary-indexed-tree.ts +46 -4
  47. package/src/data-structures/binary-tree/binary-tree.ts +79 -4
  48. package/src/data-structures/binary-tree/bst.ts +441 -6
  49. package/src/data-structures/binary-tree/red-black-tree.ts +73 -0
  50. package/src/data-structures/binary-tree/segment-tree.ts +18 -0
  51. package/src/data-structures/binary-tree/tree-map.ts +434 -9
  52. package/src/data-structures/binary-tree/tree-multi-map.ts +426 -5
  53. package/src/data-structures/binary-tree/tree-multi-set.ts +350 -6
  54. package/src/data-structures/binary-tree/tree-set.ts +410 -8
  55. package/src/data-structures/graph/abstract-graph.ts +2 -2
  56. package/src/data-structures/graph/directed-graph.ts +30 -0
  57. package/src/data-structures/graph/undirected-graph.ts +27 -0
  58. package/src/data-structures/hash/hash-map.ts +35 -4
  59. package/src/data-structures/heap/heap.ts +46 -4
  60. package/src/data-structures/heap/max-heap.ts +2 -2
  61. package/src/data-structures/linked-list/doubly-linked-list.ts +51 -0
  62. package/src/data-structures/linked-list/singly-linked-list.ts +45 -0
  63. package/src/data-structures/linked-list/skip-linked-list.ts +59 -5
  64. package/src/data-structures/matrix/matrix.ts +33 -9
  65. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  66. package/src/data-structures/queue/deque.ts +45 -0
  67. package/src/data-structures/queue/queue.ts +36 -0
  68. package/src/data-structures/stack/stack.ts +30 -0
  69. package/src/data-structures/trie/trie.ts +38 -2
  70. package/src/types/data-structures/binary-tree/bst.ts +1 -0
  71. package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
  72. package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
  73. package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
@@ -199,6 +199,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
199
199
 
200
200
 
201
201
 
202
+
203
+
204
+
202
205
 
203
206
 
204
207
 
@@ -254,6 +257,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
254
257
 
255
258
 
256
259
 
260
+
261
+
262
+
257
263
 
258
264
 
259
265
 
@@ -317,6 +323,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
317
323
 
318
324
 
319
325
 
326
+
327
+
328
+
320
329
 
321
330
 
322
331
 
@@ -374,6 +383,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
374
383
 
375
384
 
376
385
 
386
+
387
+
388
+
377
389
 
378
390
 
379
391
 
@@ -417,6 +429,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
417
429
 
418
430
 
419
431
 
432
+
433
+
434
+
420
435
 
421
436
 
422
437
 
@@ -507,6 +522,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
507
522
 
508
523
 
509
524
 
525
+
526
+
527
+
510
528
 
511
529
 
512
530
 
@@ -565,6 +583,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
565
583
 
566
584
 
567
585
 
586
+
587
+
588
+
568
589
 
569
590
 
570
591
 
@@ -611,6 +632,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
611
632
 
612
633
 
613
634
 
635
+
636
+
637
+
614
638
 
615
639
 
616
640
 
@@ -656,6 +680,9 @@ export declare class UndirectedGraph<V = any, E = any, VO extends UndirectedVert
656
680
 
657
681
 
658
682
 
683
+
684
+
685
+
659
686
 
660
687
 
661
688
 
@@ -162,6 +162,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
162
162
 
163
163
 
164
164
 
165
+
166
+
167
+
165
168
 
166
169
 
167
170
 
@@ -202,6 +205,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
202
205
 
203
206
 
204
207
 
208
+
209
+
210
+
205
211
 
206
212
 
207
213
 
@@ -282,6 +288,12 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
282
288
 
283
289
 
284
290
 
291
+
292
+
293
+
294
+
295
+
296
+
285
297
 
286
298
 
287
299
 
@@ -340,6 +352,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
340
352
 
341
353
 
342
354
 
355
+
356
+
357
+
343
358
 
344
359
 
345
360
 
@@ -384,6 +399,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
384
399
 
385
400
 
386
401
 
402
+
403
+
404
+
387
405
 
388
406
 
389
407
 
@@ -444,6 +462,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
444
462
 
445
463
 
446
464
 
465
+
466
+
467
+
447
468
 
448
469
 
449
470
 
@@ -489,6 +510,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
489
510
 
490
511
 
491
512
 
513
+
514
+
515
+
492
516
 
493
517
 
494
518
 
@@ -539,6 +563,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
539
563
 
540
564
 
541
565
 
566
+
567
+
568
+
542
569
 
543
570
 
544
571
 
@@ -586,6 +613,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
586
613
 
587
614
 
588
615
 
616
+
617
+
618
+
589
619
 
590
620
 
591
621
 
@@ -633,6 +663,9 @@ export declare class HashMap<K = any, V = any, R = [K, V]> extends IterableEntry
633
663
 
634
664
 
635
665
 
666
+
667
+
668
+
636
669
 
637
670
 
638
671
 
@@ -193,6 +193,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
193
193
 
194
194
 
195
195
 
196
+
197
+
198
+
196
199
 
197
200
 
198
201
 
@@ -268,6 +271,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
268
271
 
269
272
 
270
273
 
274
+
275
+
276
+
271
277
 
272
278
 
273
279
 
@@ -319,6 +325,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
319
325
 
320
326
 
321
327
 
328
+
329
+
330
+
322
331
 
323
332
 
324
333
 
@@ -363,6 +372,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
363
372
 
364
373
 
365
374
 
375
+
376
+
377
+
366
378
 
367
379
 
368
380
 
@@ -426,6 +438,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
426
438
 
427
439
 
428
440
 
441
+
442
+
443
+
429
444
 
430
445
 
431
446
 
@@ -521,6 +536,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
521
536
 
522
537
 
523
538
 
539
+
540
+
541
+
524
542
 
525
543
 
526
544
 
@@ -563,6 +581,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
563
581
 
564
582
 
565
583
 
584
+
585
+
586
+
566
587
 
567
588
 
568
589
 
@@ -605,6 +626,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
605
626
 
606
627
 
607
628
 
629
+
630
+
631
+
608
632
 
609
633
 
610
634
 
@@ -646,6 +670,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
646
670
 
647
671
 
648
672
 
673
+
674
+
675
+
649
676
 
650
677
 
651
678
 
@@ -695,6 +722,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
695
722
 
696
723
 
697
724
 
725
+
726
+
727
+
698
728
 
699
729
 
700
730
 
@@ -744,6 +774,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
744
774
 
745
775
 
746
776
 
777
+
778
+
779
+
747
780
 
748
781
 
749
782
 
@@ -785,6 +818,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
785
818
 
786
819
 
787
820
 
821
+
822
+
823
+
788
824
 
789
825
 
790
826
 
@@ -830,6 +866,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
830
866
 
831
867
 
832
868
 
869
+
870
+
871
+
833
872
 
834
873
 
835
874
 
@@ -875,6 +914,9 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
875
914
 
876
915
 
877
916
 
917
+
918
+
919
+
878
920
 
879
921
 
880
922
 
@@ -213,6 +213,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
213
213
 
214
214
 
215
215
 
216
+
217
+
218
+
216
219
 
217
220
 
218
221
 
@@ -266,6 +269,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
266
269
 
267
270
 
268
271
 
272
+
273
+
274
+
269
275
 
270
276
 
271
277
 
@@ -319,6 +325,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
319
325
 
320
326
 
321
327
 
328
+
329
+
330
+
322
331
 
323
332
 
324
333
 
@@ -363,6 +372,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
363
372
 
364
373
 
365
374
 
375
+
376
+
377
+
366
378
 
367
379
 
368
380
 
@@ -421,6 +433,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
421
433
 
422
434
 
423
435
 
436
+
437
+
438
+
424
439
 
425
440
 
426
441
 
@@ -462,6 +477,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
462
477
 
463
478
 
464
479
 
480
+
481
+
482
+
465
483
 
466
484
 
467
485
 
@@ -510,6 +528,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
510
528
 
511
529
 
512
530
 
531
+
532
+
533
+
513
534
 
514
535
 
515
536
 
@@ -575,6 +596,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
575
596
 
576
597
 
577
598
 
599
+
600
+
601
+
578
602
 
579
603
 
580
604
 
@@ -616,6 +640,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
616
640
 
617
641
 
618
642
 
643
+
644
+
645
+
619
646
 
620
647
 
621
648
 
@@ -657,6 +684,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
657
684
 
658
685
 
659
686
 
687
+
688
+
689
+
660
690
 
661
691
 
662
692
 
@@ -696,6 +726,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
696
726
 
697
727
 
698
728
 
729
+
730
+
731
+
699
732
 
700
733
 
701
734
 
@@ -737,6 +770,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
737
770
 
738
771
 
739
772
 
773
+
774
+
775
+
740
776
 
741
777
 
742
778
 
@@ -778,6 +814,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
778
814
 
779
815
 
780
816
 
817
+
818
+
819
+
781
820
 
782
821
 
783
822
 
@@ -822,6 +861,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
822
861
 
823
862
 
824
863
 
864
+
865
+
866
+
825
867
 
826
868
 
827
869
 
@@ -870,6 +912,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
870
912
 
871
913
 
872
914
 
915
+
916
+
917
+
873
918
 
874
919
 
875
920
 
@@ -916,6 +961,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
916
961
 
917
962
 
918
963
 
964
+
965
+
966
+
919
967
 
920
968
 
921
969
 
@@ -972,6 +1020,9 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
972
1020
 
973
1021
 
974
1022
 
1023
+
1024
+
1025
+
975
1026
 
976
1027
 
977
1028
 
@@ -262,6 +262,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
262
262
 
263
263
 
264
264
 
265
+
266
+
267
+
265
268
 
266
269
 
267
270
 
@@ -315,6 +318,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
315
318
 
316
319
 
317
320
 
321
+
322
+
323
+
318
324
 
319
325
 
320
326
 
@@ -368,6 +374,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
368
374
 
369
375
 
370
376
 
377
+
378
+
379
+
371
380
 
372
381
 
373
382
 
@@ -412,6 +421,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
412
421
 
413
422
 
414
423
 
424
+
425
+
426
+
415
427
 
416
428
 
417
429
 
@@ -492,6 +504,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
492
504
 
493
505
 
494
506
 
507
+
508
+
509
+
495
510
 
496
511
 
497
512
 
@@ -541,6 +556,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
541
556
 
542
557
 
543
558
 
559
+
560
+
561
+
544
562
 
545
563
 
546
564
 
@@ -581,6 +599,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
581
599
 
582
600
 
583
601
 
602
+
603
+
604
+
584
605
 
585
606
 
586
607
 
@@ -622,6 +643,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
622
643
 
623
644
 
624
645
 
646
+
647
+
648
+
625
649
 
626
650
 
627
651
 
@@ -664,6 +688,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
664
688
 
665
689
 
666
690
 
691
+
692
+
693
+
667
694
 
668
695
 
669
696
 
@@ -713,6 +740,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
713
740
 
714
741
 
715
742
 
743
+
744
+
745
+
716
746
 
717
747
 
718
748
 
@@ -752,6 +782,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
752
782
 
753
783
 
754
784
 
785
+
786
+
787
+
755
788
 
756
789
 
757
790
 
@@ -795,6 +828,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
795
828
 
796
829
 
797
830
 
831
+
832
+
833
+
798
834
 
799
835
 
800
836
 
@@ -889,6 +925,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
889
925
 
890
926
 
891
927
 
928
+
929
+
930
+
892
931
 
893
932
 
894
933
 
@@ -936,6 +975,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
936
975
 
937
976
 
938
977
 
978
+
979
+
980
+
939
981
 
940
982
 
941
983
 
@@ -1002,6 +1044,9 @@ export declare class SinglyLinkedList<E = any, R = any> extends LinearLinkedBase
1002
1044
 
1003
1045
 
1004
1046
 
1047
+
1048
+
1049
+
1005
1050
 
1006
1051
 
1007
1052