linked-list-typed 2.5.0 → 2.5.1
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.
- package/dist/cjs/index.cjs +1060 -10
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +1060 -10
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +1060 -10
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +1060 -10
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/data-structures/base/index.d.ts +1 -0
- package/dist/types/data-structures/base/iterable-entry-base.d.ts +8 -8
- package/dist/types/data-structures/base/linear-base.d.ts +3 -3
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +252 -0
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +294 -0
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +527 -2
- package/dist/types/data-structures/binary-tree/bst.d.ts +505 -1
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +399 -0
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +126 -1
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +2881 -382
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +2867 -347
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +2328 -312
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +2671 -277
- package/dist/types/data-structures/graph/abstract-graph.d.ts +4 -4
- package/dist/types/data-structures/graph/directed-graph.d.ts +210 -0
- package/dist/types/data-structures/graph/undirected-graph.d.ts +189 -0
- package/dist/types/data-structures/hash/hash-map.d.ts +241 -10
- package/dist/types/data-structures/heap/heap.d.ts +294 -0
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +360 -3
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +318 -3
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +380 -2
- package/dist/types/data-structures/matrix/matrix.d.ts +168 -0
- package/dist/types/data-structures/queue/deque.d.ts +319 -4
- package/dist/types/data-structures/queue/queue.d.ts +252 -0
- package/dist/types/data-structures/stack/stack.d.ts +210 -0
- package/dist/types/data-structures/trie/trie.d.ts +256 -4
- package/dist/types/interfaces/graph.d.ts +1 -1
- package/dist/types/types/common.d.ts +2 -2
- package/dist/types/types/data-structures/heap/heap.d.ts +1 -0
- package/dist/types/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
- package/dist/types/types/utils/validate-type.d.ts +4 -4
- package/dist/umd/linked-list-typed.js +1060 -10
- package/dist/umd/linked-list-typed.js.map +1 -1
- package/dist/umd/linked-list-typed.min.js +1 -1
- package/dist/umd/linked-list-typed.min.js.map +1 -1
- package/package.json +2 -2
- package/src/data-structures/base/index.ts +1 -0
- package/src/data-structures/base/iterable-entry-base.ts +8 -8
- package/src/data-structures/base/linear-base.ts +3 -3
- package/src/data-structures/binary-tree/avl-tree.ts +252 -0
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +295 -1
- package/src/data-structures/binary-tree/binary-tree.ts +527 -2
- package/src/data-structures/binary-tree/bst.ts +505 -1
- package/src/data-structures/binary-tree/red-black-tree.ts +399 -0
- package/src/data-structures/binary-tree/segment-tree.ts +127 -2
- package/src/data-structures/binary-tree/tree-map.ts +2958 -459
- package/src/data-structures/binary-tree/tree-multi-map.ts +3069 -549
- package/src/data-structures/binary-tree/tree-multi-set.ts +2476 -460
- package/src/data-structures/binary-tree/tree-set.ts +2816 -422
- package/src/data-structures/graph/abstract-graph.ts +4 -4
- package/src/data-structures/graph/directed-graph.ts +210 -0
- package/src/data-structures/graph/undirected-graph.ts +189 -0
- package/src/data-structures/hash/hash-map.ts +246 -15
- package/src/data-structures/heap/heap.ts +294 -0
- package/src/data-structures/linked-list/doubly-linked-list.ts +360 -3
- package/src/data-structures/linked-list/singly-linked-list.ts +318 -3
- package/src/data-structures/linked-list/skip-linked-list.ts +380 -2
- package/src/data-structures/matrix/matrix.ts +169 -1
- package/src/data-structures/queue/deque.ts +320 -5
- package/src/data-structures/queue/queue.ts +252 -0
- package/src/data-structures/stack/stack.ts +210 -0
- package/src/data-structures/trie/trie.ts +257 -5
- package/src/interfaces/graph.ts +1 -1
- package/src/types/common.ts +2 -2
- package/src/types/data-structures/heap/heap.ts +1 -0
- package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
- package/src/types/utils/validate-type.ts +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -738,6 +738,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
738
738
|
|
|
739
739
|
|
|
740
740
|
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
741
762
|
* @example
|
|
742
763
|
* // basic SinglyLinkedList creation and push operation
|
|
743
764
|
* // Create a simple SinglyLinkedList with initial values
|
|
@@ -781,6 +802,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
781
802
|
|
|
782
803
|
|
|
783
804
|
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
784
826
|
* @example
|
|
785
827
|
* // SinglyLinkedList pop and shift operations
|
|
786
828
|
* const list = new SinglyLinkedList<number>([10, 20, 30, 40, 50]);
|
|
@@ -829,6 +871,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
829
871
|
|
|
830
872
|
|
|
831
873
|
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
832
895
|
* @example
|
|
833
896
|
* // Remove from the front
|
|
834
897
|
* const list = new SinglyLinkedList<number>([10, 20, 30]);
|
|
@@ -859,6 +922,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
859
922
|
|
|
860
923
|
|
|
861
924
|
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
|
|
862
946
|
* @example
|
|
863
947
|
* // SinglyLinkedList unshift and forward traversal
|
|
864
948
|
* const list = new SinglyLinkedList<number>([20, 30, 40]);
|
|
@@ -950,6 +1034,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
950
1034
|
|
|
951
1035
|
|
|
952
1036
|
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
953
1058
|
* @example
|
|
954
1059
|
* // Access element by index
|
|
955
1060
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c', 'd']);
|
|
@@ -985,6 +1090,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
985
1090
|
|
|
986
1091
|
|
|
987
1092
|
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
988
1114
|
* @example
|
|
989
1115
|
* // Get node at index
|
|
990
1116
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1009,6 +1135,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1009
1135
|
|
|
1010
1136
|
|
|
1011
1137
|
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1012
1159
|
* @example
|
|
1013
1160
|
* // Remove by index
|
|
1014
1161
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1039,6 +1186,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1039
1186
|
|
|
1040
1187
|
|
|
1041
1188
|
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1042
1210
|
* @example
|
|
1043
1211
|
* // Remove first occurrence
|
|
1044
1212
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 2]);
|
|
@@ -1074,6 +1242,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1074
1242
|
|
|
1075
1243
|
|
|
1076
1244
|
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1077
1266
|
* @example
|
|
1078
1267
|
* // Insert at index
|
|
1079
1268
|
* const list = new SinglyLinkedList<number>([1, 3]);
|
|
@@ -1117,6 +1306,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1117
1306
|
|
|
1118
1307
|
|
|
1119
1308
|
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1120
1330
|
* @example
|
|
1121
1331
|
* // Check empty
|
|
1122
1332
|
* console.log(new SinglyLinkedList().isEmpty()); // true;
|
|
@@ -1137,6 +1347,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1137
1347
|
|
|
1138
1348
|
|
|
1139
1349
|
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1140
1371
|
* @example
|
|
1141
1372
|
* // Remove all
|
|
1142
1373
|
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
@@ -1163,6 +1394,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1163
1394
|
|
|
1164
1395
|
|
|
1165
1396
|
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1166
1418
|
* @example
|
|
1167
1419
|
* // Reverse the list in-place
|
|
1168
1420
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 4]);
|
|
@@ -1355,10 +1607,31 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1355
1607
|
|
|
1356
1608
|
|
|
1357
1609
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1610
|
+
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
* @example
|
|
1632
|
+
* // Deep copy
|
|
1633
|
+
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
1634
|
+
* const copy = list.clone();
|
|
1362
1635
|
* copy.pop();
|
|
1363
1636
|
* console.log(list.length); // 3;
|
|
1364
1637
|
* console.log(copy.length); // 2;
|
|
@@ -1385,6 +1658,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1385
1658
|
|
|
1386
1659
|
|
|
1387
1660
|
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1388
1682
|
* @example
|
|
1389
1683
|
* // SinglyLinkedList filter and map operations
|
|
1390
1684
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -1443,6 +1737,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1443
1737
|
|
|
1444
1738
|
|
|
1445
1739
|
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1446
1761
|
* @example
|
|
1447
1762
|
* // Transform elements
|
|
1448
1763
|
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
@@ -1739,6 +2054,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1739
2054
|
|
|
1740
2055
|
|
|
1741
2056
|
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
1742
2078
|
* @example
|
|
1743
2079
|
* // basic DoublyLinkedList creation and push operation
|
|
1744
2080
|
* // Create a simple DoublyLinkedList with initial values
|
|
@@ -1784,6 +2120,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1784
2120
|
|
|
1785
2121
|
|
|
1786
2122
|
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
|
|
1787
2144
|
* @example
|
|
1788
2145
|
* // DoublyLinkedList pop and shift operations
|
|
1789
2146
|
* const list = new DoublyLinkedList<number>([10, 20, 30, 40, 50]);
|
|
@@ -1828,6 +2185,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1828
2185
|
|
|
1829
2186
|
|
|
1830
2187
|
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
1831
2209
|
* @example
|
|
1832
2210
|
* // Remove from the front
|
|
1833
2211
|
* const list = new DoublyLinkedList<number>([10, 20, 30]);
|
|
@@ -1863,6 +2241,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1863
2241
|
|
|
1864
2242
|
|
|
1865
2243
|
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
1866
2265
|
* @example
|
|
1867
2266
|
* // Add to the front
|
|
1868
2267
|
* const list = new DoublyLinkedList<number>([2, 3]);
|
|
@@ -1927,6 +2326,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1927
2326
|
|
|
1928
2327
|
|
|
1929
2328
|
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
1930
2350
|
* @example
|
|
1931
2351
|
* // Access by index
|
|
1932
2352
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1952,6 +2372,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1952
2372
|
|
|
1953
2373
|
|
|
1954
2374
|
|
|
2375
|
+
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
|
|
1955
2396
|
* @example
|
|
1956
2397
|
* // Get node at index
|
|
1957
2398
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -2008,6 +2449,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2008
2449
|
|
|
2009
2450
|
|
|
2010
2451
|
|
|
2452
|
+
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2011
2473
|
* @example
|
|
2012
2474
|
* // Insert at position
|
|
2013
2475
|
* const list = new DoublyLinkedList<number>([1, 3]);
|
|
@@ -2092,6 +2554,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2092
2554
|
|
|
2093
2555
|
|
|
2094
2556
|
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
|
|
2572
|
+
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
|
|
2577
|
+
|
|
2095
2578
|
* @example
|
|
2096
2579
|
* // Remove by index
|
|
2097
2580
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -2123,6 +2606,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2123
2606
|
|
|
2124
2607
|
|
|
2125
2608
|
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
|
|
2126
2630
|
* @example
|
|
2127
2631
|
* // Remove first occurrence
|
|
2128
2632
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 2]);
|
|
@@ -2156,6 +2660,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2156
2660
|
|
|
2157
2661
|
|
|
2158
2662
|
|
|
2663
|
+
|
|
2664
|
+
|
|
2665
|
+
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
|
|
2676
|
+
|
|
2677
|
+
|
|
2678
|
+
|
|
2679
|
+
|
|
2680
|
+
|
|
2681
|
+
|
|
2682
|
+
|
|
2683
|
+
|
|
2159
2684
|
* @example
|
|
2160
2685
|
* // Check empty
|
|
2161
2686
|
* console.log(new DoublyLinkedList().isEmpty()); // true;
|
|
@@ -2176,6 +2701,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2176
2701
|
|
|
2177
2702
|
|
|
2178
2703
|
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
|
|
2722
|
+
|
|
2723
|
+
|
|
2724
|
+
|
|
2179
2725
|
* @example
|
|
2180
2726
|
* // Remove all
|
|
2181
2727
|
* const list = new DoublyLinkedList<number>([1, 2]);
|
|
@@ -2200,6 +2746,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2200
2746
|
|
|
2201
2747
|
|
|
2202
2748
|
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2203
2770
|
* @example
|
|
2204
2771
|
* // Search with predicate
|
|
2205
2772
|
* const list = new DoublyLinkedList<number>([10, 20, 30]);
|
|
@@ -2228,6 +2795,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2228
2795
|
|
|
2229
2796
|
|
|
2230
2797
|
|
|
2798
|
+
|
|
2799
|
+
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
|
|
2803
|
+
|
|
2804
|
+
|
|
2805
|
+
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
|
|
2818
|
+
|
|
2231
2819
|
* @example
|
|
2232
2820
|
* // Find value scanning from tail
|
|
2233
2821
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4]);
|
|
@@ -2259,6 +2847,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2259
2847
|
|
|
2260
2848
|
|
|
2261
2849
|
|
|
2850
|
+
|
|
2851
|
+
|
|
2852
|
+
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2262
2871
|
* @example
|
|
2263
2872
|
* // Reverse in-place
|
|
2264
2873
|
* const list = new DoublyLinkedList<number>([1, 2, 3]);
|
|
@@ -2298,6 +2907,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2298
2907
|
|
|
2299
2908
|
|
|
2300
2909
|
|
|
2910
|
+
|
|
2911
|
+
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2301
2931
|
* @example
|
|
2302
2932
|
* // Deep copy
|
|
2303
2933
|
* const list = new DoublyLinkedList<number>([1, 2, 3]);
|
|
@@ -2327,6 +2957,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2327
2957
|
|
|
2328
2958
|
|
|
2329
2959
|
|
|
2960
|
+
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
|
|
2330
2981
|
* @example
|
|
2331
2982
|
* // Filter elements
|
|
2332
2983
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -2375,6 +3026,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2375
3026
|
|
|
2376
3027
|
|
|
2377
3028
|
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
2378
3050
|
* @example
|
|
2379
3051
|
* // DoublyLinkedList for...of iteration and map operation
|
|
2380
3052
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -2803,6 +3475,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2803
3475
|
|
|
2804
3476
|
|
|
2805
3477
|
|
|
3478
|
+
|
|
3479
|
+
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
|
|
3487
|
+
|
|
3488
|
+
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
|
+
|
|
3498
|
+
|
|
2806
3499
|
* @example
|
|
2807
3500
|
* // Check if empty
|
|
2808
3501
|
* const sl = new SkipList<number, string>();
|
|
@@ -2821,6 +3514,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2821
3514
|
|
|
2822
3515
|
|
|
2823
3516
|
|
|
3517
|
+
|
|
3518
|
+
|
|
3519
|
+
|
|
3520
|
+
|
|
3521
|
+
|
|
3522
|
+
|
|
3523
|
+
|
|
3524
|
+
|
|
3525
|
+
|
|
3526
|
+
|
|
3527
|
+
|
|
3528
|
+
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
|
|
3536
|
+
|
|
3537
|
+
|
|
2824
3538
|
* @example
|
|
2825
3539
|
* // Remove all entries
|
|
2826
3540
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -2842,6 +3556,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2842
3556
|
|
|
2843
3557
|
|
|
2844
3558
|
|
|
3559
|
+
|
|
3560
|
+
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
|
|
3564
|
+
|
|
3565
|
+
|
|
3566
|
+
|
|
3567
|
+
|
|
3568
|
+
|
|
3569
|
+
|
|
3570
|
+
|
|
3571
|
+
|
|
3572
|
+
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
|
|
3579
|
+
|
|
2845
3580
|
* @example
|
|
2846
3581
|
* // Create independent copy
|
|
2847
3582
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -2871,6 +3606,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2871
3606
|
|
|
2872
3607
|
|
|
2873
3608
|
|
|
3609
|
+
|
|
3610
|
+
|
|
3611
|
+
|
|
3612
|
+
|
|
3613
|
+
|
|
3614
|
+
|
|
3615
|
+
|
|
3616
|
+
|
|
3617
|
+
|
|
3618
|
+
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3625
|
+
|
|
3626
|
+
|
|
3627
|
+
|
|
3628
|
+
|
|
3629
|
+
|
|
2874
3630
|
* @example
|
|
2875
3631
|
* // In-memory sorted key-value store
|
|
2876
3632
|
* const store = new SkipList<number, string>();
|
|
@@ -2925,17 +3681,38 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2925
3681
|
|
|
2926
3682
|
|
|
2927
3683
|
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
3684
|
+
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
|
|
3691
|
+
|
|
3692
|
+
|
|
3693
|
+
|
|
3694
|
+
|
|
3695
|
+
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
|
|
3701
|
+
|
|
3702
|
+
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
* @example
|
|
3706
|
+
* // Building a sorted index
|
|
3707
|
+
* type Product = { id: number; name: string; price: number };
|
|
3708
|
+
* const products: Product[] = [
|
|
2932
3709
|
* { id: 1, name: 'Widget', price: 25 },
|
|
2933
3710
|
* { id: 2, name: 'Gadget', price: 50 },
|
|
2934
3711
|
* { id: 3, name: 'Doohickey', price: 15 }
|
|
2935
3712
|
* ];
|
|
2936
3713
|
*
|
|
2937
|
-
* const index = new SkipList<number, Product>(products
|
|
2938
|
-
* toEntryFn: (p:
|
|
3714
|
+
* const index = new SkipList<number, Product, Product>(products, {
|
|
3715
|
+
* toEntryFn: (p: Product) => [p.price, p]
|
|
2939
3716
|
* });
|
|
2940
3717
|
*
|
|
2941
3718
|
* // Iterate in sorted order by price
|
|
@@ -2964,6 +3741,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2964
3741
|
|
|
2965
3742
|
|
|
2966
3743
|
|
|
3744
|
+
|
|
3745
|
+
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
|
|
3749
|
+
|
|
3750
|
+
|
|
3751
|
+
|
|
3752
|
+
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
|
+
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
|
|
2967
3765
|
* @example
|
|
2968
3766
|
* // Check key existence
|
|
2969
3767
|
* const sl = new SkipList<number, string>([[1, 'a'], [3, 'c'], [5, 'e']]);
|
|
@@ -2986,6 +3784,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2986
3784
|
|
|
2987
3785
|
|
|
2988
3786
|
|
|
3787
|
+
|
|
3788
|
+
|
|
3789
|
+
|
|
3790
|
+
|
|
3791
|
+
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
|
|
2989
3808
|
* @example
|
|
2990
3809
|
* // Fast lookup with deletion
|
|
2991
3810
|
* const cache = new SkipList<string, number>();
|
|
@@ -3028,6 +3847,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3028
3847
|
|
|
3029
3848
|
|
|
3030
3849
|
|
|
3850
|
+
|
|
3851
|
+
|
|
3852
|
+
|
|
3853
|
+
|
|
3854
|
+
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
|
|
3861
|
+
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
|
|
3031
3871
|
* @example
|
|
3032
3872
|
* // Access the minimum entry
|
|
3033
3873
|
* const sl = new SkipList<number, string>([[5, 'e'], [1, 'a'], [3, 'c']]);
|
|
@@ -3050,6 +3890,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3050
3890
|
|
|
3051
3891
|
|
|
3052
3892
|
|
|
3893
|
+
|
|
3894
|
+
|
|
3895
|
+
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
|
|
3899
|
+
|
|
3900
|
+
|
|
3901
|
+
|
|
3902
|
+
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
|
|
3906
|
+
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
|
|
3913
|
+
|
|
3053
3914
|
* @example
|
|
3054
3915
|
* // Access the maximum entry
|
|
3055
3916
|
* const sl = new SkipList<number, string>([[5, 'e'], [1, 'a'], [3, 'c']]);
|
|
@@ -3074,6 +3935,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3074
3935
|
|
|
3075
3936
|
|
|
3076
3937
|
|
|
3938
|
+
|
|
3939
|
+
|
|
3940
|
+
|
|
3941
|
+
|
|
3942
|
+
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
|
|
3946
|
+
|
|
3947
|
+
|
|
3948
|
+
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
|
+
|
|
3952
|
+
|
|
3953
|
+
|
|
3954
|
+
|
|
3955
|
+
|
|
3956
|
+
|
|
3957
|
+
|
|
3958
|
+
|
|
3077
3959
|
* @example
|
|
3078
3960
|
* // Remove and return smallest
|
|
3079
3961
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|
|
@@ -3096,6 +3978,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3096
3978
|
|
|
3097
3979
|
|
|
3098
3980
|
|
|
3981
|
+
|
|
3982
|
+
|
|
3983
|
+
|
|
3984
|
+
|
|
3985
|
+
|
|
3986
|
+
|
|
3987
|
+
|
|
3988
|
+
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
|
+
|
|
3992
|
+
|
|
3993
|
+
|
|
3994
|
+
|
|
3995
|
+
|
|
3996
|
+
|
|
3997
|
+
|
|
3998
|
+
|
|
3999
|
+
|
|
4000
|
+
|
|
4001
|
+
|
|
3099
4002
|
* @example
|
|
3100
4003
|
* // Remove and return largest
|
|
3101
4004
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|
|
@@ -3121,6 +4024,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3121
4024
|
|
|
3122
4025
|
|
|
3123
4026
|
|
|
4027
|
+
|
|
4028
|
+
|
|
4029
|
+
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
|
+
|
|
4036
|
+
|
|
4037
|
+
|
|
4038
|
+
|
|
4039
|
+
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
|
+
|
|
4043
|
+
|
|
4044
|
+
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
|
|
3124
4048
|
* @example
|
|
3125
4049
|
* // Least entry ≥ key
|
|
3126
4050
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3151,6 +4075,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3151
4075
|
|
|
3152
4076
|
|
|
3153
4077
|
|
|
4078
|
+
|
|
4079
|
+
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
3154
4099
|
* @example
|
|
3155
4100
|
* // Greatest entry ≤ key
|
|
3156
4101
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3179,6 +4124,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3179
4124
|
|
|
3180
4125
|
|
|
3181
4126
|
|
|
4127
|
+
|
|
4128
|
+
|
|
4129
|
+
|
|
4130
|
+
|
|
4131
|
+
|
|
4132
|
+
|
|
4133
|
+
|
|
4134
|
+
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
|
|
4138
|
+
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
|
|
4142
|
+
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
3182
4148
|
* @example
|
|
3183
4149
|
* // Strictly greater entry
|
|
3184
4150
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3206,6 +4172,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3206
4172
|
|
|
3207
4173
|
|
|
3208
4174
|
|
|
4175
|
+
|
|
4176
|
+
|
|
4177
|
+
|
|
4178
|
+
|
|
4179
|
+
|
|
4180
|
+
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
|
|
4186
|
+
|
|
4187
|
+
|
|
4188
|
+
|
|
4189
|
+
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
|
|
4195
|
+
|
|
3209
4196
|
* @example
|
|
3210
4197
|
* // Strictly less entry
|
|
3211
4198
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3239,6 +4226,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3239
4226
|
|
|
3240
4227
|
|
|
3241
4228
|
|
|
4229
|
+
|
|
4230
|
+
|
|
4231
|
+
|
|
4232
|
+
|
|
4233
|
+
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
|
|
4239
|
+
|
|
4240
|
+
|
|
4241
|
+
|
|
4242
|
+
|
|
4243
|
+
|
|
4244
|
+
|
|
4245
|
+
|
|
4246
|
+
|
|
4247
|
+
|
|
4248
|
+
|
|
4249
|
+
|
|
3242
4250
|
* @example
|
|
3243
4251
|
* // Find entries in a range
|
|
3244
4252
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c'], [4, 'd'], [5, 'e']]);
|
|
@@ -3280,6 +4288,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3280
4288
|
|
|
3281
4289
|
|
|
3282
4290
|
|
|
4291
|
+
|
|
4292
|
+
|
|
4293
|
+
|
|
4294
|
+
|
|
4295
|
+
|
|
4296
|
+
|
|
4297
|
+
|
|
4298
|
+
|
|
4299
|
+
|
|
4300
|
+
|
|
4301
|
+
|
|
4302
|
+
|
|
4303
|
+
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
|
|
4311
|
+
|
|
3283
4312
|
* @example
|
|
3284
4313
|
* // Transform entries
|
|
3285
4314
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -3305,6 +4334,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3305
4334
|
|
|
3306
4335
|
|
|
3307
4336
|
|
|
4337
|
+
|
|
4338
|
+
|
|
4339
|
+
|
|
4340
|
+
|
|
4341
|
+
|
|
4342
|
+
|
|
4343
|
+
|
|
4344
|
+
|
|
4345
|
+
|
|
4346
|
+
|
|
4347
|
+
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
|
+
|
|
4351
|
+
|
|
4352
|
+
|
|
4353
|
+
|
|
4354
|
+
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
|
|
3308
4358
|
* @example
|
|
3309
4359
|
* // Filter entries
|
|
3310
4360
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|