-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.py
50 lines (47 loc) · 12.5 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
topics = {
'array': [1,4,11,15,16,18,26,27,31,33,34,35,39,40,41,42,45,48,53,54,55,56,57,59,62,63,64,66,73,74,75,78,79,80,81,84,85,88,90,105,106,118,119,120,121,122,123,126,128,152,153,154,162,163,167,169,189,209,216,217,219,228,229,238,243,245,259,268,277,280,283,287,289,370,380,381,414,442,448,457,485,495,509,531,532,533,548,560,561,562,565,566,581,605,611,621,624,628,643,644,661,665,667,670,674,689,695,697,713,714,717,718,719,723,724,729,746,747,755,766,768,769,775,782,792,795,825,830,832,835,840,849,867,870,873,888,891,896,900,905,907,914,915,918,922,926,941,945,950,954,962,969,974,977,978,985,989,999,1002,1007,1010,1011,1013,1014,1018,1031,1035,1040,1051,1052,1053,1064,1074,1085,1086,1089,1099,1109,1122,1128,1133,1144,1146,1150,1151,1152,1157,1160,1169,1170,1176,1177,1184,1185,1200,1202,1208,1217,1222,1232,1233,1243,1252,1260,1266,1267,1275,1277,1287,1292,1295,1296,1299,1300,1304,1313,1329,1330,1331,1333,1337,1338,1343,1346,1351,1352,1365,1366,1375,1380,1385,1386,1389,1394,1395,1399,1409,1413,1414,1423,1424,1426,1427,1428,1431,1437,1438,1442,1450,1460,1464,1465,1470,1471,1475,1476,1480,1481,1482,1486,1488,1491,1493,1497,1499,1500,1502,1503,1508,1509,1512,1524,1534,1535,1539,1550,1552,1560,1566,1570,1572,1574,1582,1583,1588,1590,1608,1619,1629,1636,1640,1646,1652,1656,1672,1700,1701,1708,1711,1726,1732,1733,1738,1742,1748,1752,1756,1758,1764,1769,1773,1779],
'hash table': [1,3,18,30,36,37,49,76,85,94,136,138,149,159,166,170,187,202,204,205,217,219,242,244,246,249,266,274,288,290,299,311,325,336,340,347,349,350,355,356,358,359,380,381,387,389,409,438,447,451,454,463,500,508,525,535,554,560,575,594,599,609,624,632,645,648,676,690,692,694,705,706,710,711,718,720,726,734,739,748,760,770,771,781,811,884,895,930,939,953,954,957,961,966,970,974,981,987,992,1001,1002,1044,1048,1072,1078,1086,1090,1133,1138,1152,1160,1166,1178,1189,1198,1207,1213,1218,1224,1244,1261,1311,1365,1418,1429,1485,1487,1488,1490,1512,1539,1570,1577,1590,1612,1638,1640,1679,1711,1726,1748,1772,1781],
'linked list': [2,19,21,23,24,25,61,82,83,86,92,109,138,141,142,143,147,148,160,203,206,234,237,328,369,379,426,430,445,707,708,725,817,876,1019,1171,1290,1367,1474,1634,1669,1670,1721],
'math': [2,7,8,9,12,13,29,43,50,60,65,67,69,149,166,168,171,172,202,204,223,224,231,233,246,247,248,258,263,264,268,273,279,296,313,319,326,335,343,356,357,360,365,367,368,372,396,397,400,413,423,441,447,453,458,462,469,478,483,492,507,517,523,535,537,553,573,592,593,598,625,628,633,634,640,645,651,660,670,672,728,753,754,775,780,781,782,789,794,800,805,810,812,829,836,858,866,868,869,877,878,883,885,887,891,892,899,902,906,908,910,914,927,942,949,952,963,964,970,972,976,991,996,1006,1009,1012,1015,1017,1025,1037,1041,1056,1058,1067,1073,1088,1093,1103,1104,1109,1121,1131,1134,1154,1175,1180,1183,1199,1201,1217,1218,1227,1228,1230,1232,1237,1238,1250,1253,1256,1259,1271,1272,1276,1281,1307,1317,1323,1330,1344,1359,1362,1363,1390,1427,1442,1447,1467,1478,1492,1497,1512,1513,1523,1524,1551,1577,1590,1622,1627,1641,1648,1680,1685,1716,1735,1739,1744,1753,1766,1776,1780],
'two-pointers': [3,11,15,16,18,19,26,27,28,30,42,61,75,76,80,86,88,125,141,142,159,167,209,234,259,283,287,340,344,345,349,350,360,424,457,487,524,532,567,632,713,723,763,826,828,838,844,845,881,904,923,925,930,948,977,986,992,1004,1093,1099,1213,1229,1234,1248,1570,1610,1616,1658,1687,1695,1711,1712,1750],
'string': [3,5,6,8,10,12,13,14,17,20,22,28,30,32,38,43,44,49,58,65,67,68,71,72,76,87,91,93,97,115,125,126,151,157,158,159,161,165,186,214,227,249,271,273,293,316,336,340,344,345,383,385,387,408,415,434,443,459,468,520,521,522,527,536,537,539,541,544,551,553,555,556,557,564,583,591,606,609,616,632,635,647,657,678,680,681,686,696,709,722,730,736,758,761,767,770,772,788,791,800,804,809,816,819,824,831,833,842,848,856,859,890,893,899,916,917,925,929,936,937,966,1003,1016,1023,1062,1065,1071,1081,1096,1100,1106,1108,1119,1138,1156,1163,1165,1169,1170,1177,1180,1181,1189,1216,1221,1233,1234,1247,1249,1268,1271,1297,1309,1311,1316,1324,1328,1332,1347,1358,1370,1371,1374,1392,1404,1408,1410,1417,1419,1422,1432,1433,1436,1446,1449,1451,1452,1455,1456,1461,1487,1496,1507,1513,1525,1529,1531,1540,1541,1542,1544,1545,1556,1573,1576,1585,1592,1597,1604,1614,1616,1618,1624,1638,1653,1662,1668,1678,1682,1684,1694,1698,1704,1736,1737,1745,1759,1763,1768,1773,1781],
'binary search': [4,29,33,34,35,50,69,74,81,153,154,162,167,174,209,222,230,240,270,275,278,287,300,302,315,327,349,350,352,354,363,367,374,378,392,410,436,441,454,475,483,493,497,528,540,644,658,668,702,704,710,718,719,744,774,778,786,793,852,862,875,878,887,911,927,981,1011,1044,1060,1064,1095,1111,1150,1157,1170,1182,1198,1201,1231,1235,1237,1283,1292,1300,1337,1351,1482,1521,1533,1552,1562,1574,1590,1618,1631,1642,1649,1658,1712,1739,1751,1760],
'divide and conquer': [4,23,53,169,215,218,240,241,282,312,315,327,395,426,493,514,903,932,973,1274,1755],
'dp': [5,10,32,42,44,53,62,63,64,70,72,85,87,91,95,96,97,115,120,121,123,131,132,139,140,152,174,188,198,213,221,256,264,265,276,279,300,303,304,309,312,321,322,337,338,343,351,354,357,361,363,368,375,376,377,392,403,410,413,416,418,446,464,466,467,471,472,474,486,494,514,516,517,523,546,552,568,576,600,629,638,639,646,647,650,651,656,664,673,688,689,691,698,712,714,718,727,730,740,741,746,750,764,787,790,799,801,808,813,818,837,838,847,871,873,877,879,887,898,902,903,920,931,935,940,943,956,960,964,968,975,978,982,983,1000,1012,1024,1025,1027,1039,1043,1048,1049,1055,1058,1066,1067,1074,1092,1105,1125,1130,1136,1139,1140,1143,1147,1155,1186,1187,1191,1199,1216,1218,1220,1223,1227,1230,1235,1240,1246,1259,1262,1269,1273,1277,1278,1289,1301,1312,1314,1320,1326,1335,1339,1340,1349,1359,1363,1367,1372,1373,1388,1397,1402,1405,1406,1411,1416,1420,1423,1425,1434,1444,1449,1458,1463,1473,1477,1478,1483,1504,1510,1531,1537,1546,1547,1548,1553,1563,1569,1575,1594,1595,1601,1611,1621,1626,1639,1641,1643,1654,1655,1659,1664,1671,1682,1687,1690,1691,1692,1706,1724,1728,1745,1746,1751,1770,1771],
'backtracking': [10,17,22,37,39,40,44,46,47,51,52,60,77,78,79,89,90,93,126,131,140,211,212,216,254,267,291,294,306,320,351,357,401,411,425,526,691,784,797,842,967,980,996,1066,1079,1087,1088,1215,1219,1239,1240,1258,1286,1291,1307,1415,1467,1593,1617,1641,1655,1659,1681,1688,1718,1723,1780],
'stack': [20,42,71,84,85,94,103,144,145,150,155,173,224,225,227,232,255,272,316,331,341,385,394,402,439,456,496,503,591,636,682,726,735,739,770,772,844,856,880,895,901,907,921,946,975,1003,1019,1021,1047,1063,1081,1124,1130,1190,1209,1249,1381,1410,1441,1541,1544,1598,1673,1703],
'heap': [23,215,218,239,253,264,295,313,347,355,358,373,378,407,451,502,659,692,703,719,743,759,767,778,786,787,818,857,864,871,882,973,1046,1054,1439,1642,1673,1675,1705,1753,1760],
'greedy': [44,45,55,122,134,135,253,316,321,330,358,376,392,402,406,435,452,455,484,502,605,621,630,649,651,659,714,738,757,759,763,765,767,842,860,861,870,874,881,910,921,927,936,944,948,955,984,991,995,1005,1007,1029,1046,1053,1055,1057,1058,1081,1090,1094,1111,1167,1196,1217,1221,1231,1247,1253,1276,1282,1288,1296,1326,1338,1353,1354,1383,1386,1400,1403,1405,1414,1433,1497,1505,1518,1520,1536,1540,1558,1564,1567,1568,1578,1580,1585,1589,1591,1594,1599,1605,1616,1620,1632,1647,1648,1653,1657,1658,1663,1664,1665,1673,1674,1681,1685,1686,1689,1702,1705,1708,1710,1713,1716,1717,1722,1725,1727,1733,1736,1737,1743,1749,1754,1758,1759,1762,1764,1769,1774,1775],
'sort': [56,57,75,147,148,164,179,220,242,252,253,274,280,296,315,324,327,349,350,360,452,493,524,527,710,767,853,922,948,969,973,976,1030,1054,1057,1086,1099,1122,1152,1183,1229,1235,1244,1288,1305,1329,1333,1353,1356,1366,1370,1383,1387,1403,1424,1451,1452,1471,1481,1491,1498,1502,1508,1509,1528,1561,1630,1636,1637,1640,1647,1648,1691,1697,1710,1727,1772],
'bit manipulation': [78,136,137,169,187,190,191,201,231,260,268,318,320,338,342,371,389,393,397,401,405,411,421,461,476,477,693,751,756,762,784,898,1125,1131,1178,1239,1255,1256,1290,1297,1310,1318,1342,1356,1404,1434,1442,1457,1461,1486,1521,1525,1542,1611,1707,1720,1734],
'tree': [94,95,96,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,116,117,124,129,144,145,156,173,199,222,226,230,235,236,250,255,257,270,272,285,297,298,333,337,366,404,426,428,429,431,437,449,450,501,508,510,513,515,530,536,538,543,545,549,559,563,572,582,589,590,606,617,623,637,652,653,654,655,662,663,666,669,671,684,685,687,700,701,742,776,783,814,834,863,865,872,889,894,897,919,938,951,958,965,968,971,979,987,988,993,998,1008,1022,1026,1028,1038,1104,1110,1120,1123,1130,1145,1161,1245,1257,1261,1302,1305,1315,1325,1339,1367,1372,1379,1430,1443,1448,1457,1466,1469,1485,1490,1516,1530,1586,1597,1600,1602,1609,1612,1628,1644,1650,1660,1666,1676,1719,1740,1766],
'dfs': [17,98,99,100,101,104,105,106,108,109,110,111,112,113,114,116,117,124,129,130,131,133,199,200,207,210,211,257,261,301,314,323,329,332,337,339,364,366,394,417,430,439,472,473,488,489,490,491,494,499,505,513,514,515,526,529,531,538,542,546,547,559,563,576,638,664,679,685,690,694,695,711,721,733,737,743,749,753,756,778,783,785,797,802,827,834,839,841,851,863,865,872,886,897,924,928,934,938,947,959,967,968,971,979,980,987,988,1020,1026,1028,1034,1038,1059,1061,1080,1102,1110,1123,1136,1145,1192,1203,1236,1242,1245,1254,1273,1302,1306,1315,1319,1339,1376,1377,1379,1391,1443,1448,1457,1466,1469,1485,1489,1490,1519,1530,1559,1625,1631,1666,1676,1722,1730,1740,1766,1778],
'bfs': [101,102,103,107,111,116,126,127,130,133,199,200,207,210,261,279,286,301,310,314,317,323,339,407,417,429,490,499,505,513,515,529,542,559,675,690,694,743,752,773,785,787,815,827,847,854,863,864,865,882,909,913,934,967,987,993,994,1036,1091,1129,1161,1162,1197,1210,1236,1242,1245,1263,1284,1293,1298,1306,1311,1319,1345,1368,1379,1391,1485,1490,1519,1602,1625,1654,1730,1740,1765,1766,1778],
'union-find': [128,130,200,261,305,323,399,547,684,685,721,737,765,778,803,839,924,928,947,952,959,990,1061,1101,1102,1135,1168,1202,1319,1489,1579,1584,1627,1631,1632,1697,1722,1724],
'graph': [133,207,210,261,269,310,323,332,399,444,684,685,743,765,785,797,802,839,841,854,886,928,959,990,996,997,1042,1059,1102,1129,1135,1136,1153,1162,1168,1203,1267,1334,1361,1387,1462,1494,1514,1548,1557,1595,1615,1631,1719,1724,1730,1761,1765,1778,1782],
'design': [146,155,170,173,208,211,225,232,244,251,281,284,288,295,297,341,346,348,353,355,359,362,379,380,381,432,460,588,604,622,631,635,641,642,703,705,706,707,716,1166,1172,1206,1244,1286,1348,1352,1357,1381,1396,1429,1472,1500,1586,1600,1603,1622,1628,1656,1670,1756],
'top sort': [207,210,269,329,444,1203],
'trie': [208,211,212,336,421,425,472,642,648,676,677,692,720,745,1023,1032,1065,1638,1698,1707],
'binary indexed tree': [218,307,308,315,327,493,1649],
'segment tree': [218,307,308,315,327,493,699,715,732,850,1157,1353,1521,1526,1649,1687],
'bst': [538,1038,1214,1373,1382],
'recursion': [2,17,21,24,98,104,110,124,199,247,248,369,395,538,544,563,625,669,687,698,726,761,776,779,783,794,865,894,897,938,967,1038,1137,1306,1379,1718,1723,1780],
'brainteaser': [292,319,521,777,1033,1227,1503],
'memo': [329],
'queue': [199,346,353,363,582,621,622,641,862,933,1673],
'minimax': [292,294,375,464,486,843,877,913],
'reservoir sampling': [382,398],
'ordered map': [220,352,683,699,715,731,732,846,855,975,1604,1606,1649,1675],
'geometry': [587,892,963,1232,1266,1401,1453,1515,1610],
'random': [470,478,497,519,528,710],
'rejection sampling': [470,478],
'sliding window': [3,76,159,239,340,395,424,480,567,727,978,992,995,1004,1040,1052,1074,1100,1151,1176,1208,1423,1438,1456,1498,1499,1658],
'line sweep': [218,391,850,1229,1272,1288],
'rolling hash': [1147,1316,1638,1698],
'suffix array': [1044,1163,1698,1754],
'dequeue': [239,1670,1687,1696,1756]
}
for (topic,alias) in [('array', 'arr'), ('hash table', 'hash'), ('linked list', 'll'), ('two-pointers', '2ptr'), ('string', 'str'), ('binary search', 'binsearch'), ('backtracking', 'backtrack'), ('stack', 'stk'), ('bit manipulation', 'bit'), ('top sort', 'topological sort')]:
topics[alias] = topics[topic]
# console.log(Array.from(document.querySelectorAll('.reactable-data tr td[label="#"]')).map(x => x.textContent).toString())
blind75 = [217, 238, 153, 560, 191, 190, 53, 377, 91, 55, 121, 1, 33, 11, 338, 70, 300, 198, 62, 53, 152, 15, 371, 268, 139, 213, 63, 133, 207, 417, 695, 128, 127, 19, 56, 435, 206, 141, 21, 23, 143, 73, 48, 3, 424, 76, 242, 49, 20, 125, 5, 647, 617, 104, 98, 226, 124, 102, 297, 572, 105, 98, 230, 235, 205, 208, 211, 212, 703, 23, 373, 347, 295, 33, 153, 1011, 779, 209, 46, 78, 39, 22, 283, 392, 31, 8, 6, 322, 200, 57, 54, 79, 100]