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/cjs/index.cjs
CHANGED
|
@@ -740,6 +740,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
740
740
|
|
|
741
741
|
|
|
742
742
|
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
743
764
|
* @example
|
|
744
765
|
* // basic SinglyLinkedList creation and push operation
|
|
745
766
|
* // Create a simple SinglyLinkedList with initial values
|
|
@@ -783,6 +804,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
783
804
|
|
|
784
805
|
|
|
785
806
|
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
786
828
|
* @example
|
|
787
829
|
* // SinglyLinkedList pop and shift operations
|
|
788
830
|
* const list = new SinglyLinkedList<number>([10, 20, 30, 40, 50]);
|
|
@@ -831,6 +873,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
831
873
|
|
|
832
874
|
|
|
833
875
|
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
834
897
|
* @example
|
|
835
898
|
* // Remove from the front
|
|
836
899
|
* const list = new SinglyLinkedList<number>([10, 20, 30]);
|
|
@@ -861,6 +924,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
861
924
|
|
|
862
925
|
|
|
863
926
|
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
|
|
864
948
|
* @example
|
|
865
949
|
* // SinglyLinkedList unshift and forward traversal
|
|
866
950
|
* const list = new SinglyLinkedList<number>([20, 30, 40]);
|
|
@@ -952,6 +1036,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
952
1036
|
|
|
953
1037
|
|
|
954
1038
|
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
955
1060
|
* @example
|
|
956
1061
|
* // Access element by index
|
|
957
1062
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c', 'd']);
|
|
@@ -987,6 +1092,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
987
1092
|
|
|
988
1093
|
|
|
989
1094
|
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
990
1116
|
* @example
|
|
991
1117
|
* // Get node at index
|
|
992
1118
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1011,6 +1137,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1011
1137
|
|
|
1012
1138
|
|
|
1013
1139
|
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
|
|
1014
1161
|
* @example
|
|
1015
1162
|
* // Remove by index
|
|
1016
1163
|
* const list = new SinglyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1041,6 +1188,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1041
1188
|
|
|
1042
1189
|
|
|
1043
1190
|
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1196
|
+
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1044
1212
|
* @example
|
|
1045
1213
|
* // Remove first occurrence
|
|
1046
1214
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 2]);
|
|
@@ -1076,6 +1244,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1076
1244
|
|
|
1077
1245
|
|
|
1078
1246
|
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
|
|
1079
1268
|
* @example
|
|
1080
1269
|
* // Insert at index
|
|
1081
1270
|
* const list = new SinglyLinkedList<number>([1, 3]);
|
|
@@ -1119,6 +1308,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1119
1308
|
|
|
1120
1309
|
|
|
1121
1310
|
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
|
|
1330
|
+
|
|
1331
|
+
|
|
1122
1332
|
* @example
|
|
1123
1333
|
* // Check empty
|
|
1124
1334
|
* console.log(new SinglyLinkedList().isEmpty()); // true;
|
|
@@ -1139,6 +1349,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1139
1349
|
|
|
1140
1350
|
|
|
1141
1351
|
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
|
|
1142
1373
|
* @example
|
|
1143
1374
|
* // Remove all
|
|
1144
1375
|
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
@@ -1165,6 +1396,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1165
1396
|
|
|
1166
1397
|
|
|
1167
1398
|
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
|
|
1168
1420
|
* @example
|
|
1169
1421
|
* // Reverse the list in-place
|
|
1170
1422
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 4]);
|
|
@@ -1357,10 +1609,31 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1357
1609
|
|
|
1358
1610
|
|
|
1359
1611
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
|
|
1623
|
+
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
* @example
|
|
1634
|
+
* // Deep copy
|
|
1635
|
+
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
1636
|
+
* const copy = list.clone();
|
|
1364
1637
|
* copy.pop();
|
|
1365
1638
|
* console.log(list.length); // 3;
|
|
1366
1639
|
* console.log(copy.length); // 2;
|
|
@@ -1387,6 +1660,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1387
1660
|
|
|
1388
1661
|
|
|
1389
1662
|
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1390
1684
|
* @example
|
|
1391
1685
|
* // SinglyLinkedList filter and map operations
|
|
1392
1686
|
* const list = new SinglyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -1445,6 +1739,27 @@ var SinglyLinkedList = class extends LinearLinkedBase {
|
|
|
1445
1739
|
|
|
1446
1740
|
|
|
1447
1741
|
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
|
|
1759
|
+
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
|
|
1448
1763
|
* @example
|
|
1449
1764
|
* // Transform elements
|
|
1450
1765
|
* const list = new SinglyLinkedList<number>([1, 2, 3]);
|
|
@@ -1741,6 +2056,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1741
2056
|
|
|
1742
2057
|
|
|
1743
2058
|
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
|
|
2067
|
+
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
|
|
1744
2080
|
* @example
|
|
1745
2081
|
* // basic DoublyLinkedList creation and push operation
|
|
1746
2082
|
* // Create a simple DoublyLinkedList with initial values
|
|
@@ -1786,6 +2122,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1786
2122
|
|
|
1787
2123
|
|
|
1788
2124
|
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
|
|
1789
2146
|
* @example
|
|
1790
2147
|
* // DoublyLinkedList pop and shift operations
|
|
1791
2148
|
* const list = new DoublyLinkedList<number>([10, 20, 30, 40, 50]);
|
|
@@ -1830,6 +2187,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1830
2187
|
|
|
1831
2188
|
|
|
1832
2189
|
|
|
2190
|
+
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
1833
2211
|
* @example
|
|
1834
2212
|
* // Remove from the front
|
|
1835
2213
|
* const list = new DoublyLinkedList<number>([10, 20, 30]);
|
|
@@ -1865,6 +2243,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1865
2243
|
|
|
1866
2244
|
|
|
1867
2245
|
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
1868
2267
|
* @example
|
|
1869
2268
|
* // Add to the front
|
|
1870
2269
|
* const list = new DoublyLinkedList<number>([2, 3]);
|
|
@@ -1929,6 +2328,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1929
2328
|
|
|
1930
2329
|
|
|
1931
2330
|
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
|
|
1932
2352
|
* @example
|
|
1933
2353
|
* // Access by index
|
|
1934
2354
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -1954,6 +2374,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
1954
2374
|
|
|
1955
2375
|
|
|
1956
2376
|
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
|
|
1957
2398
|
* @example
|
|
1958
2399
|
* // Get node at index
|
|
1959
2400
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -2010,6 +2451,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2010
2451
|
|
|
2011
2452
|
|
|
2012
2453
|
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
|
|
2013
2475
|
* @example
|
|
2014
2476
|
* // Insert at position
|
|
2015
2477
|
* const list = new DoublyLinkedList<number>([1, 3]);
|
|
@@ -2094,6 +2556,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2094
2556
|
|
|
2095
2557
|
|
|
2096
2558
|
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
|
|
2572
|
+
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
|
|
2576
|
+
|
|
2577
|
+
|
|
2578
|
+
|
|
2579
|
+
|
|
2097
2580
|
* @example
|
|
2098
2581
|
* // Remove by index
|
|
2099
2582
|
* const list = new DoublyLinkedList<string>(['a', 'b', 'c']);
|
|
@@ -2125,6 +2608,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2125
2608
|
|
|
2126
2609
|
|
|
2127
2610
|
|
|
2611
|
+
|
|
2612
|
+
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
|
|
2616
|
+
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
|
|
2128
2632
|
* @example
|
|
2129
2633
|
* // Remove first occurrence
|
|
2130
2634
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 2]);
|
|
@@ -2158,6 +2662,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2158
2662
|
|
|
2159
2663
|
|
|
2160
2664
|
|
|
2665
|
+
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
|
|
2672
|
+
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
|
|
2676
|
+
|
|
2677
|
+
|
|
2678
|
+
|
|
2679
|
+
|
|
2680
|
+
|
|
2681
|
+
|
|
2682
|
+
|
|
2683
|
+
|
|
2684
|
+
|
|
2685
|
+
|
|
2161
2686
|
* @example
|
|
2162
2687
|
* // Check empty
|
|
2163
2688
|
* console.log(new DoublyLinkedList().isEmpty()); // true;
|
|
@@ -2178,6 +2703,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2178
2703
|
|
|
2179
2704
|
|
|
2180
2705
|
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
|
|
2722
|
+
|
|
2723
|
+
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
|
|
2181
2727
|
* @example
|
|
2182
2728
|
* // Remove all
|
|
2183
2729
|
* const list = new DoublyLinkedList<number>([1, 2]);
|
|
@@ -2202,6 +2748,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2202
2748
|
|
|
2203
2749
|
|
|
2204
2750
|
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
|
|
2763
|
+
|
|
2764
|
+
|
|
2765
|
+
|
|
2766
|
+
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
|
|
2205
2772
|
* @example
|
|
2206
2773
|
* // Search with predicate
|
|
2207
2774
|
* const list = new DoublyLinkedList<number>([10, 20, 30]);
|
|
@@ -2230,6 +2797,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2230
2797
|
|
|
2231
2798
|
|
|
2232
2799
|
|
|
2800
|
+
|
|
2801
|
+
|
|
2802
|
+
|
|
2803
|
+
|
|
2804
|
+
|
|
2805
|
+
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
|
|
2816
|
+
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
|
|
2820
|
+
|
|
2233
2821
|
* @example
|
|
2234
2822
|
* // Find value scanning from tail
|
|
2235
2823
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4]);
|
|
@@ -2261,6 +2849,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2261
2849
|
|
|
2262
2850
|
|
|
2263
2851
|
|
|
2852
|
+
|
|
2853
|
+
|
|
2854
|
+
|
|
2855
|
+
|
|
2856
|
+
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
|
|
2864
|
+
|
|
2865
|
+
|
|
2866
|
+
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2264
2873
|
* @example
|
|
2265
2874
|
* // Reverse in-place
|
|
2266
2875
|
* const list = new DoublyLinkedList<number>([1, 2, 3]);
|
|
@@ -2300,6 +2909,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2300
2909
|
|
|
2301
2910
|
|
|
2302
2911
|
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2915
|
+
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2303
2933
|
* @example
|
|
2304
2934
|
* // Deep copy
|
|
2305
2935
|
* const list = new DoublyLinkedList<number>([1, 2, 3]);
|
|
@@ -2329,6 +2959,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2329
2959
|
|
|
2330
2960
|
|
|
2331
2961
|
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
|
|
2969
|
+
|
|
2970
|
+
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
|
|
2978
|
+
|
|
2979
|
+
|
|
2980
|
+
|
|
2981
|
+
|
|
2982
|
+
|
|
2332
2983
|
* @example
|
|
2333
2984
|
* // Filter elements
|
|
2334
2985
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -2377,6 +3028,27 @@ var DoublyLinkedList = class extends LinearLinkedBase {
|
|
|
2377
3028
|
|
|
2378
3029
|
|
|
2379
3030
|
|
|
3031
|
+
|
|
3032
|
+
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
|
|
3044
|
+
|
|
3045
|
+
|
|
3046
|
+
|
|
3047
|
+
|
|
3048
|
+
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
|
|
2380
3052
|
* @example
|
|
2381
3053
|
* // DoublyLinkedList for...of iteration and map operation
|
|
2382
3054
|
* const list = new DoublyLinkedList<number>([1, 2, 3, 4, 5]);
|
|
@@ -2805,6 +3477,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2805
3477
|
|
|
2806
3478
|
|
|
2807
3479
|
|
|
3480
|
+
|
|
3481
|
+
|
|
3482
|
+
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
|
|
3486
|
+
|
|
3487
|
+
|
|
3488
|
+
|
|
3489
|
+
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
|
|
3496
|
+
|
|
3497
|
+
|
|
3498
|
+
|
|
3499
|
+
|
|
3500
|
+
|
|
2808
3501
|
* @example
|
|
2809
3502
|
* // Check if empty
|
|
2810
3503
|
* const sl = new SkipList<number, string>();
|
|
@@ -2823,6 +3516,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2823
3516
|
|
|
2824
3517
|
|
|
2825
3518
|
|
|
3519
|
+
|
|
3520
|
+
|
|
3521
|
+
|
|
3522
|
+
|
|
3523
|
+
|
|
3524
|
+
|
|
3525
|
+
|
|
3526
|
+
|
|
3527
|
+
|
|
3528
|
+
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
|
|
3535
|
+
|
|
3536
|
+
|
|
3537
|
+
|
|
3538
|
+
|
|
3539
|
+
|
|
2826
3540
|
* @example
|
|
2827
3541
|
* // Remove all entries
|
|
2828
3542
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -2844,6 +3558,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2844
3558
|
|
|
2845
3559
|
|
|
2846
3560
|
|
|
3561
|
+
|
|
3562
|
+
|
|
3563
|
+
|
|
3564
|
+
|
|
3565
|
+
|
|
3566
|
+
|
|
3567
|
+
|
|
3568
|
+
|
|
3569
|
+
|
|
3570
|
+
|
|
3571
|
+
|
|
3572
|
+
|
|
3573
|
+
|
|
3574
|
+
|
|
3575
|
+
|
|
3576
|
+
|
|
3577
|
+
|
|
3578
|
+
|
|
3579
|
+
|
|
3580
|
+
|
|
3581
|
+
|
|
2847
3582
|
* @example
|
|
2848
3583
|
* // Create independent copy
|
|
2849
3584
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -2873,6 +3608,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2873
3608
|
|
|
2874
3609
|
|
|
2875
3610
|
|
|
3611
|
+
|
|
3612
|
+
|
|
3613
|
+
|
|
3614
|
+
|
|
3615
|
+
|
|
3616
|
+
|
|
3617
|
+
|
|
3618
|
+
|
|
3619
|
+
|
|
3620
|
+
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3625
|
+
|
|
3626
|
+
|
|
3627
|
+
|
|
3628
|
+
|
|
3629
|
+
|
|
3630
|
+
|
|
3631
|
+
|
|
2876
3632
|
* @example
|
|
2877
3633
|
* // In-memory sorted key-value store
|
|
2878
3634
|
* const store = new SkipList<number, string>();
|
|
@@ -2927,17 +3683,38 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2927
3683
|
|
|
2928
3684
|
|
|
2929
3685
|
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
3686
|
+
|
|
3687
|
+
|
|
3688
|
+
|
|
3689
|
+
|
|
3690
|
+
|
|
3691
|
+
|
|
3692
|
+
|
|
3693
|
+
|
|
3694
|
+
|
|
3695
|
+
|
|
3696
|
+
|
|
3697
|
+
|
|
3698
|
+
|
|
3699
|
+
|
|
3700
|
+
|
|
3701
|
+
|
|
3702
|
+
|
|
3703
|
+
|
|
3704
|
+
|
|
3705
|
+
|
|
3706
|
+
|
|
3707
|
+
* @example
|
|
3708
|
+
* // Building a sorted index
|
|
3709
|
+
* type Product = { id: number; name: string; price: number };
|
|
3710
|
+
* const products: Product[] = [
|
|
2934
3711
|
* { id: 1, name: 'Widget', price: 25 },
|
|
2935
3712
|
* { id: 2, name: 'Gadget', price: 50 },
|
|
2936
3713
|
* { id: 3, name: 'Doohickey', price: 15 }
|
|
2937
3714
|
* ];
|
|
2938
3715
|
*
|
|
2939
|
-
* const index = new SkipList<number, Product>(products
|
|
2940
|
-
* toEntryFn: (p:
|
|
3716
|
+
* const index = new SkipList<number, Product, Product>(products, {
|
|
3717
|
+
* toEntryFn: (p: Product) => [p.price, p]
|
|
2941
3718
|
* });
|
|
2942
3719
|
*
|
|
2943
3720
|
* // Iterate in sorted order by price
|
|
@@ -2966,6 +3743,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2966
3743
|
|
|
2967
3744
|
|
|
2968
3745
|
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
|
|
3749
|
+
|
|
3750
|
+
|
|
3751
|
+
|
|
3752
|
+
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
|
|
3756
|
+
|
|
3757
|
+
|
|
3758
|
+
|
|
3759
|
+
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
|
|
3763
|
+
|
|
3764
|
+
|
|
3765
|
+
|
|
3766
|
+
|
|
2969
3767
|
* @example
|
|
2970
3768
|
* // Check key existence
|
|
2971
3769
|
* const sl = new SkipList<number, string>([[1, 'a'], [3, 'c'], [5, 'e']]);
|
|
@@ -2988,6 +3786,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
2988
3786
|
|
|
2989
3787
|
|
|
2990
3788
|
|
|
3789
|
+
|
|
3790
|
+
|
|
3791
|
+
|
|
3792
|
+
|
|
3793
|
+
|
|
3794
|
+
|
|
3795
|
+
|
|
3796
|
+
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
|
|
3804
|
+
|
|
3805
|
+
|
|
3806
|
+
|
|
3807
|
+
|
|
3808
|
+
|
|
3809
|
+
|
|
2991
3810
|
* @example
|
|
2992
3811
|
* // Fast lookup with deletion
|
|
2993
3812
|
* const cache = new SkipList<string, number>();
|
|
@@ -3030,6 +3849,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3030
3849
|
|
|
3031
3850
|
|
|
3032
3851
|
|
|
3852
|
+
|
|
3853
|
+
|
|
3854
|
+
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
|
|
3861
|
+
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
|
|
3871
|
+
|
|
3872
|
+
|
|
3033
3873
|
* @example
|
|
3034
3874
|
* // Access the minimum entry
|
|
3035
3875
|
* const sl = new SkipList<number, string>([[5, 'e'], [1, 'a'], [3, 'c']]);
|
|
@@ -3052,6 +3892,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3052
3892
|
|
|
3053
3893
|
|
|
3054
3894
|
|
|
3895
|
+
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
|
|
3899
|
+
|
|
3900
|
+
|
|
3901
|
+
|
|
3902
|
+
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
|
|
3906
|
+
|
|
3907
|
+
|
|
3908
|
+
|
|
3909
|
+
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
|
|
3913
|
+
|
|
3914
|
+
|
|
3915
|
+
|
|
3055
3916
|
* @example
|
|
3056
3917
|
* // Access the maximum entry
|
|
3057
3918
|
* const sl = new SkipList<number, string>([[5, 'e'], [1, 'a'], [3, 'c']]);
|
|
@@ -3076,6 +3937,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3076
3937
|
|
|
3077
3938
|
|
|
3078
3939
|
|
|
3940
|
+
|
|
3941
|
+
|
|
3942
|
+
|
|
3943
|
+
|
|
3944
|
+
|
|
3945
|
+
|
|
3946
|
+
|
|
3947
|
+
|
|
3948
|
+
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
|
+
|
|
3952
|
+
|
|
3953
|
+
|
|
3954
|
+
|
|
3955
|
+
|
|
3956
|
+
|
|
3957
|
+
|
|
3958
|
+
|
|
3959
|
+
|
|
3960
|
+
|
|
3079
3961
|
* @example
|
|
3080
3962
|
* // Remove and return smallest
|
|
3081
3963
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|
|
@@ -3098,6 +3980,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3098
3980
|
|
|
3099
3981
|
|
|
3100
3982
|
|
|
3983
|
+
|
|
3984
|
+
|
|
3985
|
+
|
|
3986
|
+
|
|
3987
|
+
|
|
3988
|
+
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
|
+
|
|
3992
|
+
|
|
3993
|
+
|
|
3994
|
+
|
|
3995
|
+
|
|
3996
|
+
|
|
3997
|
+
|
|
3998
|
+
|
|
3999
|
+
|
|
4000
|
+
|
|
4001
|
+
|
|
4002
|
+
|
|
4003
|
+
|
|
3101
4004
|
* @example
|
|
3102
4005
|
* // Remove and return largest
|
|
3103
4006
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|
|
@@ -3123,6 +4026,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3123
4026
|
|
|
3124
4027
|
|
|
3125
4028
|
|
|
4029
|
+
|
|
4030
|
+
|
|
4031
|
+
|
|
4032
|
+
|
|
4033
|
+
|
|
4034
|
+
|
|
4035
|
+
|
|
4036
|
+
|
|
4037
|
+
|
|
4038
|
+
|
|
4039
|
+
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
|
+
|
|
4043
|
+
|
|
4044
|
+
|
|
4045
|
+
|
|
4046
|
+
|
|
4047
|
+
|
|
4048
|
+
|
|
4049
|
+
|
|
3126
4050
|
* @example
|
|
3127
4051
|
* // Least entry ≥ key
|
|
3128
4052
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3153,6 +4077,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3153
4077
|
|
|
3154
4078
|
|
|
3155
4079
|
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
|
|
4091
|
+
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
|
|
4095
|
+
|
|
4096
|
+
|
|
4097
|
+
|
|
4098
|
+
|
|
4099
|
+
|
|
4100
|
+
|
|
3156
4101
|
* @example
|
|
3157
4102
|
* // Greatest entry ≤ key
|
|
3158
4103
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3181,6 +4126,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3181
4126
|
|
|
3182
4127
|
|
|
3183
4128
|
|
|
4129
|
+
|
|
4130
|
+
|
|
4131
|
+
|
|
4132
|
+
|
|
4133
|
+
|
|
4134
|
+
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
|
|
4138
|
+
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
|
|
4142
|
+
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
|
|
4149
|
+
|
|
3184
4150
|
* @example
|
|
3185
4151
|
* // Strictly greater entry
|
|
3186
4152
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3208,6 +4174,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3208
4174
|
|
|
3209
4175
|
|
|
3210
4176
|
|
|
4177
|
+
|
|
4178
|
+
|
|
4179
|
+
|
|
4180
|
+
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
|
|
4186
|
+
|
|
4187
|
+
|
|
4188
|
+
|
|
4189
|
+
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
|
|
4195
|
+
|
|
4196
|
+
|
|
4197
|
+
|
|
3211
4198
|
* @example
|
|
3212
4199
|
* // Strictly less entry
|
|
3213
4200
|
* const sl = new SkipList<number, string>([[10, 'a'], [20, 'b'], [30, 'c']]);
|
|
@@ -3241,6 +4228,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3241
4228
|
|
|
3242
4229
|
|
|
3243
4230
|
|
|
4231
|
+
|
|
4232
|
+
|
|
4233
|
+
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
|
|
4237
|
+
|
|
4238
|
+
|
|
4239
|
+
|
|
4240
|
+
|
|
4241
|
+
|
|
4242
|
+
|
|
4243
|
+
|
|
4244
|
+
|
|
4245
|
+
|
|
4246
|
+
|
|
4247
|
+
|
|
4248
|
+
|
|
4249
|
+
|
|
4250
|
+
|
|
4251
|
+
|
|
3244
4252
|
* @example
|
|
3245
4253
|
* // Find entries in a range
|
|
3246
4254
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c'], [4, 'd'], [5, 'e']]);
|
|
@@ -3282,6 +4290,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3282
4290
|
|
|
3283
4291
|
|
|
3284
4292
|
|
|
4293
|
+
|
|
4294
|
+
|
|
4295
|
+
|
|
4296
|
+
|
|
4297
|
+
|
|
4298
|
+
|
|
4299
|
+
|
|
4300
|
+
|
|
4301
|
+
|
|
4302
|
+
|
|
4303
|
+
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
|
|
4313
|
+
|
|
3285
4314
|
* @example
|
|
3286
4315
|
* // Transform entries
|
|
3287
4316
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b']]);
|
|
@@ -3307,6 +4336,27 @@ var SkipList = class _SkipList extends IterableEntryBase {
|
|
|
3307
4336
|
|
|
3308
4337
|
|
|
3309
4338
|
|
|
4339
|
+
|
|
4340
|
+
|
|
4341
|
+
|
|
4342
|
+
|
|
4343
|
+
|
|
4344
|
+
|
|
4345
|
+
|
|
4346
|
+
|
|
4347
|
+
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
|
+
|
|
4351
|
+
|
|
4352
|
+
|
|
4353
|
+
|
|
4354
|
+
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
|
|
4358
|
+
|
|
4359
|
+
|
|
3310
4360
|
* @example
|
|
3311
4361
|
* // Filter entries
|
|
3312
4362
|
* const sl = new SkipList<number, string>([[1, 'a'], [2, 'b'], [3, 'c']]);
|