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
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
1
00:00:00,000 --> 00:00:00,500

2
00:00:00,500 --> 00:00:03,340
[Music kucheza]

3
00:00:03,340 --> 00:00:11,020

4
00:00:11,020 --> 00:00:14,010
>> DAVID Malan: Hii ni CS50.

5
00:00:14,010 --> 00:00:18,090
Na hii ni wa mwanzo na
end-- kama literally-- karibu mwisho

6
00:00:18,090 --> 00:00:18,825
ya wiki sita.

7
00:00:18,825 --> 00:00:20,030

8
00:00:20,030 --> 00:00:22,640
>> Nilidhani ningependa kushiriki
kidogo ya ukweli na furaha.

9
00:00:22,640 --> 00:00:25,370
Nimekuwa vunjwa hii kutoka
data ya nyuma muhula ya kuweka.

10
00:00:25,370 --> 00:00:29,710
Unaweza kukumbuka kwamba sisi kuuliza wewe juu ya kila
p kuweka aina kama wameweza watched online

11
00:00:29,710 --> 00:00:31,580
au kama wameweza walihudhuria katika mtu.

12
00:00:31,580 --> 00:00:33,020
Na hapa ni data.

13
00:00:33,020 --> 00:00:34,710
Hivyo leo ilikuwa sana kutabirika.

14
00:00:34,710 --> 00:00:37,126
Lakini sisi alitaka kutumia kidogo
muda na wewe hata hivyo.

15
00:00:37,126 --> 00:00:40,599
Je, mtu yeyote kama dhana nini hii
graph ni hivyo jaggy, hadi chini, juu chini,

16
00:00:40,599 --> 00:00:41,265
hivyo mara kwa mara?

17
00:00:41,265 --> 00:00:42,980

18
00:00:42,980 --> 00:00:45,130
Nini kufanya kila ya peaks
na Mabwawa kuwakilisha?

19
00:00:45,130 --> 00:00:46,005
>> Watazamaji: [inaudible]

20
00:00:46,005 --> 00:00:47,002

21
00:00:47,002 --> 00:00:47,835
DAVID Malan: Hakika.

22
00:00:47,835 --> 00:00:50,900

23
00:00:50,900 --> 00:00:55,480
Na zaidi amusingly, mungu apishe,
sisi kushikilia hotuba moja Ijumaa

24
00:00:55,480 --> 00:00:58,960
mwanzoni mwa muhula,
kwamba ni nini tunaona kutokea.

25
00:00:58,960 --> 00:01:03,430
Hivyo leo, sisi kushiriki katika kidogo
zaidi kuhusu miundo ya data.

26
00:01:03,430 --> 00:01:06,660
Na kukupa zaidi ya imara
mfano wa akili kwa ajili ya matatizo saa tano,

27
00:01:06,660 --> 00:01:07,450
ambayo sasa ni nje.

28
00:01:07,450 --> 00:01:10,817
Misspellings, eti, tutaweza
mkono wewe faili Nakala baadhi 100,000

29
00:01:10,817 --> 00:01:12,650
pamoja maneno ya Kiingereza, na
wewe ni kwenda kuwa na

30
00:01:12,650 --> 00:01:17,770
kufikiri jinsi ya cleverly shehena yao
katika kumbukumbu, katika RAM, kwa kutumia baadhi ya data

31
00:01:17,770 --> 00:01:19,330
muundo wa uchaguzi wako.

32
00:01:19,330 --> 00:01:22,470
>> Sasa mmoja kama data muundo inaweza
kuwa, lakini pengine lazima kuwa,

33
00:01:22,470 --> 00:01:25,630
uungwana simplistic wanaohusishwa orodha,
ambayo sisi ilianzisha mara ya mwisho.

34
00:01:25,630 --> 00:01:29,220
Na orodha wanaohusishwa alikuwa angalau
faida moja juu ya safu.

35
00:01:29,220 --> 00:01:32,096
Nini faida moja ya
orodha wanaohusishwa arguably?

36
00:01:32,096 --> 00:01:32,950
>> Watazamaji: Insertion.

37
00:01:32,950 --> 00:01:33,908
>> DAVID Malan: Insertion.

38
00:01:33,908 --> 00:01:34,155

39
00:01:34,155 --> 00:01:35,196
Nini maana na kwamba?

40
00:01:35,196 --> 00:01:37,872
>> Watazamaji: popote pamoja
orodha [inaudible].

41
00:01:37,872 --> 00:01:38,770
>> DAVID Malan: Good.

42
00:01:38,770 --> 00:01:42,090
Hivyo unaweza kuingiza kipengele popote
unataka katikati ya orodha

43
00:01:42,090 --> 00:01:45,490
bila ya kuwa na changa chochote,
ambayo sisi alihitimisha, katika kuchagua wetu

44
00:01:45,490 --> 00:01:47,630
majadiliano, si
lazima jambo jema,

45
00:01:47,630 --> 00:01:51,200
kwa sababu inachukua muda wa kweli hoja
yote ya binadamu wale wa kushoto au kulia.

46
00:01:51,200 --> 00:01:55,540
Na hivyo na orodha wanaohusishwa, unaweza
tu kutenga na malloc, nodi mpya,

47
00:01:55,540 --> 00:01:58,385
na kisha update michache
pointers-- mbili, shughuli tatu max--

48
00:01:58,385 --> 00:02:01,480
na sisi ni uwezo wa yanayopangwa mtu
katika mahali popote katika orodha.

49
00:02:01,480 --> 00:02:03,550
>> Kile kingine ilikuwa faida
kuhusu orodha wanaohusishwa?

50
00:02:03,550 --> 00:02:04,980

51
00:02:04,980 --> 00:02:05,659
Yeah?

52
00:02:05,659 --> 00:02:06,534
>> Watazamaji: [inaudible]

53
00:02:06,534 --> 00:02:07,538

54
00:02:07,538 --> 00:02:08,413
DAVID Malan: Perfect.

55
00:02:08,413 --> 00:02:10,590

56
00:02:10,590 --> 00:02:11,090
Kamilifu.

57
00:02:11,090 --> 00:02:12,070
Ni kweli nguvu.

58
00:02:12,070 --> 00:02:15,100
Na kwamba wewe si kufanya,
mapema, baadhi ya ukubwa fasta

59
00:02:15,100 --> 00:02:18,750
chunk ya kumbukumbu, kama ingekuwa
kwa pamoja na safu, kichwa ambayo

60
00:02:18,750 --> 00:02:22,455
ni kwamba unaweza kutenga nodes tu juu ya
mahitaji na hivyo kutumia nafasi kama kiasi tu

61
00:02:22,455 --> 00:02:23,330
kweli kama unahitaji.

62
00:02:23,330 --> 00:02:26,830
Kwa kulinganisha na safu, unaweza
ajali kutenga kidogo sana.

63
00:02:26,830 --> 00:02:28,871
Na basi ni kwenda tu
kuwa maumivu ya shingo

64
00:02:28,871 --> 00:02:32,440
kwa reallocate mpya kubwa safu, nakala
kila kitu juu, bure safu ya zamani,

65
00:02:32,440 --> 00:02:33,990
na kisha kuondoka kuhusu biashara yako.

66
00:02:33,990 --> 00:02:37,479
Au mbaya zaidi, unaweza kutenga njia
zaidi ya kumbukumbu kuliko wewe kweli haja,

67
00:02:37,479 --> 00:02:40,520
na hivyo wewe ni kwenda kuwa na sana
wachache-wakazi safu, hivyo kusema.

68
00:02:40,520 --> 00:02:44,350
>> Hivyo orodha wanaohusishwa inakupa haya
faida ya mabadiliko na kubadilika

69
00:02:44,350 --> 00:02:46,080
na insertions na kufuta maneno.

70
00:02:46,080 --> 00:02:48,000
Lakini hakika lazima kuna bei ya kulipwa.

71
00:02:48,000 --> 00:02:50,000
Kwa kweli, moja ya mandhari
Kugundua juu ya jaribio sifuri

72
00:02:50,000 --> 00:02:52,430
ilikuwa michache ya biashara awamu ya pili
tumeona hivi sasa.

73
00:02:52,430 --> 00:02:56,161
Basi nini au bei ya kulipwa
upande wa chini ya orodha wanaohusishwa?

74
00:02:56,161 --> 00:02:56,660
Yeah.

75
00:02:56,660 --> 00:02:57,560
>> Watazamaji: Hakuna upatikanaji random.

76
00:02:57,560 --> 00:02:58,809
>> DAVID Malan: Hakuna upatikanaji random.

77
00:02:58,809 --> 00:02:59,540
Lakini anayejali?

78
00:02:59,540 --> 00:03:01,546
Random upatikanaji haina sauti ya kulazimisha.

79
00:03:01,546 --> 00:03:02,421
>> Watazamaji: [inaudible]

80
00:03:02,421 --> 00:03:04,865

81
00:03:04,865 --> 00:03:05,740
DAVID Malan: Hasa.

82
00:03:05,740 --> 00:03:07,580
Kama unataka kuwa
algorithm-- fulani

83
00:03:07,580 --> 00:03:10,170
na napenda kweli kupendekeza
binary tafuta hasa, ambayo

84
00:03:10,170 --> 00:03:12,600
ni moja tumekuwa kutumika kabisa bit--
kama huna upatikanaji random,

85
00:03:12,600 --> 00:03:15,516
unaweza kufanya hivyo hesabu rahisi
ya kutafuta kama kipengele katikati

86
00:03:15,516 --> 00:03:16,530
na kuruka haki yake.

87
00:03:16,530 --> 00:03:20,239
Wewe badala kuanza kwa mara ya kwanza
kipengele na linearly kutafuta kutoka kushoto

88
00:03:20,239 --> 00:03:22,780
na haki kama unataka kupata
katikati au kipengele nyingine yoyote.

89
00:03:22,780 --> 00:03:24,410
>> Watazamaji: Ni pengine inachukua zaidi ya kumbukumbu.

90
00:03:24,410 --> 00:03:25,040
>> DAVID Malan: inachukua zaidi ya kumbukumbu.

91
00:03:25,040 --> 00:03:27,464
Ambapo ni kwamba ziada
gharama kuja kutoka katika kumbukumbu?

92
00:03:27,464 --> 00:03:28,339
>> Watazamaji: [inaudible]

93
00:03:28,339 --> 00:03:32,566

94
00:03:32,566 --> 00:03:33,440
DAVID Malan: Hasa.

95
00:03:33,440 --> 00:03:35,679
Katika kesi hii hapa, tulikuwa
orodha wanaohusishwa kwa integers,

96
00:03:35,679 --> 00:03:37,470
na bado tuko mara dufu
kiasi cha kumbukumbu

97
00:03:37,470 --> 00:03:39,680
tunahitaji na pia kuhifadhi kuyatumia haya.

98
00:03:39,680 --> 00:03:42,090
Sasa chini ya mpango kubwa kama
structs yako kupata kubwa

99
00:03:42,090 --> 00:03:45,320
na wewe ni hifadhi si idadi lakini
labda mwanafunzi au baadhi kitu kingine.

100
00:03:45,320 --> 00:03:46,880
Lakini uhakika hakika bado.

101
00:03:46,880 --> 00:03:49,421
Na hivyo idadi ya shughuli
katika orodha wanaohusishwa waliitwa

102
00:03:49,421 --> 00:03:50,570
walikuwa O kubwa ya n-- linear.

103
00:03:50,570 --> 00:03:54,730
Mambo kama insertion au tafuta
au kufutwa katika kesi ya kipengele

104
00:03:54,730 --> 00:03:57,720
kilichotokea kwa kuwa katika mwisho sana ya
orodha kama ni vyema au la.

105
00:03:57,720 --> 00:04:01,167
>> Wakati mwingine unaweza kupata bahati na katika
mipaka hivyo chini juu ya shughuli hizo

106
00:04:01,167 --> 00:04:04,250
anaweza pia kuwa wakati mara kwa mara kama wewe ni
daima kuangalia kipengele kwanza,

107
00:04:04,250 --> 00:04:05,070
kwa mfano.

108
00:04:05,070 --> 00:04:09,360
Lakini hatimaye, sisi aliahidi
kufikia grail takatifu

109
00:04:09,360 --> 00:04:12,630
wa miundo data, au
baadhi yake makadirio,

110
00:04:12,630 --> 00:04:14,290
kwa njia ya muda wa mara kwa mara.

111
00:04:14,290 --> 00:04:17,579
Tunaweza kupata mambo au kuongeza mambo
au kuondoa vipengele kutoka orodha?

112
00:04:17,579 --> 00:04:19,059
Tutaona kabisa hivi karibuni.

113
00:04:19,059 --> 00:04:21,100
Na zinageuka kuwa moja
ya taratibu tuko

114
00:04:21,100 --> 00:04:23,464
kwenda kuanza kutumia leo,
matumizi ya kila mwaka katika p kuweka tano,

115
00:04:23,464 --> 00:04:24,630
ni kweli pretty ukoo.

116
00:04:24,630 --> 00:04:27,430
Kwa mfano, kama hii ni rundo
vitabu mtihani, ambayo kila mmoja

117
00:04:27,430 --> 00:04:29,660
ina mwanafunzi wa kwanza
jina na jina la mwisho juu yake,

118
00:04:29,660 --> 00:04:31,820
na mimi kuwachukua kutoka
mwishoni mwa mtihani,

119
00:04:31,820 --> 00:04:33,746
na wao uko wote pretty
kiasi ili random,

120
00:04:33,746 --> 00:04:36,370
na tunataka kwenda juu ya kuchagua
mitihani hizi hivyo kwamba mara graded

121
00:04:36,370 --> 00:04:38,661
ni tu rahisi sana na
kasi ya mkono wao nyuma nje

122
00:04:38,661 --> 00:04:40,030
kwa wanafunzi alphabetically.

123
00:04:40,030 --> 00:04:42,770
Gani silika yako kuwa
kwa rundo la mitihani kama hii?

124
00:04:42,770 --> 00:04:45,019
>> Naam, kama wewe ni kama mimi, wewe
ili kuona kwamba hii ni m,

125
00:04:45,019 --> 00:04:48,505
hivyo mimi nina kwenda aina ya kuweka hii katika,
kama hii ni meza yangu au sakafu yangu ambapo

126
00:04:48,505 --> 00:04:50,650
Mimi kueneza mambo
out-- au safu yangu really--

127
00:04:50,650 --> 00:04:52,210
Nipate kuweka yote ya Bi huko.

128
00:04:52,210 --> 00:04:52,710
Oh.

129
00:04:52,710 --> 00:04:55,020
Hapa ni A. Hivyo mimi ili
kuweka Kama zaidi ya hapa.

130
00:04:55,020 --> 00:04:55,520
Oh.

131
00:04:55,520 --> 00:04:57,980
Hapa ni A. mwingine mimi nina kwenda
kuweka kwamba zaidi ya hapa.

132
00:04:57,980 --> 00:05:02,490
Hapa ni Z. Hapa ni mwingine M. Na hivyo
Mimi ili kuanza kufanya piles kama hii.

133
00:05:02,490 --> 00:05:06,620
Na kisha labda Ningependa kwenda katika baadaye
na aina ya nitpicky-ly sana aina

134
00:05:06,620 --> 00:05:07,710
piles ya mtu binafsi.

135
00:05:07,710 --> 00:05:11,300
Lakini uhakika ni mimi bila kuangalia
katika pembejeo kwamba mimi nina mitupu

136
00:05:11,300 --> 00:05:14,016
na napenda kufanya baadhi ya mahesabu
uamuzi kulingana na pembejeo kwamba.

137
00:05:14,016 --> 00:05:15,640
Kama ni kuanza na, kuiweka zaidi ya hapo.

138
00:05:15,640 --> 00:05:18,980
Kama ni kuanza kwa Z, kuiweka juu ya
huko, na kila kitu katika kati.

139
00:05:18,980 --> 00:05:22,730
>> Hivyo hii ni mbinu hiyo ni
ujumla inayojulikana kama hashing-- H-A-S-H--

140
00:05:22,730 --> 00:05:26,550
ambayo kwa ujumla ina maana ya kuchukua kama
pembejeo na kutumia pembejeo kwamba compute

141
00:05:26,550 --> 00:05:30,940
thamani, kwa ujumla idadi, na kwamba
idadi ni index katika kuhifadhi

142
00:05:30,940 --> 00:05:32,260
chombo, kama safu.

143
00:05:32,260 --> 00:05:35,490
Hivyo kwa maneno mengine, mimi ili kuwa na
kazi hash, kama mimi kufanya katika kichwa changu,

144
00:05:35,490 --> 00:05:37,940
kwamba kama mimi kuona mtu ni
jina ambao huanza na A,

145
00:05:37,940 --> 00:05:40,190
Mimi nina kwenda ramani kwamba
kwa sifuri katika kichwa changu.

146
00:05:40,190 --> 00:05:44,160
Na kama mimi kuona mtu na Z, mimi nina
kwenda ramani kwamba 25 katika kichwa changu

147
00:05:44,160 --> 00:05:46,220
na kisha kuweka kwamba katika
mwisho zaidi ya rundo.

148
00:05:46,220 --> 00:05:50,990
>> Sasa, kama unafikiri kuhusu si ubongo wangu
lakini C mpango, nini naweza namba

149
00:05:50,990 --> 00:05:53,170
wanategemea kufikia matokeo kwamba huo?

150
00:05:53,170 --> 00:05:55,594
Kwa maneno mengine, kama wewe
alikuwa ASCII tabia A,

151
00:05:55,594 --> 00:05:57,510
jinsi gani unaweza kuamua
nini ndoo ili kuweka katika?

152
00:05:57,510 --> 00:05:59,801
Pengine hawataki
kuiweka katika ndoo 65, ambayo

153
00:05:59,801 --> 00:06:01,840
itakuwa kama zaidi ya hapo
kwa maana hakuna sababu nzuri.

154
00:06:01,840 --> 00:06:04,320
Ambapo unataka kuweka A
katika suala la thamani yake ASCII?

155
00:06:04,320 --> 00:06:05,600

156
00:06:05,600 --> 00:06:08,920
Ambapo unataka kufanya ASCII wake
thamani kuja na ndoo nadhifu

157
00:06:08,920 --> 00:06:09,480
kuiweka katika?

158
00:06:09,480 --> 00:06:10,206
>> Watazamaji: Minus A.

159
00:06:10,206 --> 00:06:10,956
>> DAVID Malan: Yeah.

160
00:06:10,956 --> 00:06:13,190
Hivyo minus A au bala
hasa 65 kama ni

161
00:06:13,190 --> 00:06:18,240
mji mkuu A. Au 98 kama
ni ndogo a.

162
00:06:18,240 --> 00:06:21,300
Na hivyo kwamba itakuwa kuruhusu sisi, sana
tu na kihisabati sana,

163
00:06:21,300 --> 00:06:23,260
kuweka kitu ndani ya ndoo kama hiyo.

164
00:06:23,260 --> 00:06:26,010
Hivyo ni zamu nje sisi kwa kweli kufanya
hii vilevile hata kwa Quizzes.

165
00:06:26,010 --> 00:06:29,051
>> Hivyo unaweza kukumbuka you ikizunguka yako
jina mafundisho wenzake juu ya bima.

166
00:06:29,051 --> 00:06:32,270
Na majina TF walikuwa kupangwa
ndani ya nguzo hizi alphabetically,

167
00:06:32,270 --> 00:06:34,400
vizuri, amini au si,
wakati wote pamoja na 80 wa kwetu

168
00:06:34,400 --> 00:06:37,800
got pamoja usiku mengine daraja,
hatua ya mwisho katika mchakato wetu grading

169
00:06:37,800 --> 00:06:41,830
ni hash Quizzes katika kubwa
nafasi ya sakafu katika [inaudible]

170
00:06:41,830 --> 00:06:45,110
na kuweka Quizzes kila mtu nje
katika hasa utaratibu wa TF yao

171
00:06:45,110 --> 00:06:47,700
majina juu ya bima, kwa sababu
basi ni rahisi sana kwa ajili yetu

172
00:06:47,700 --> 00:06:51,290
kutafuta njia ya kwamba kwa kutumia linear
kutafuta au aina fulani ya ujanja

173
00:06:51,290 --> 00:06:54,050
kwa TF kupata au wake
wanafunzi wake 'Quizzes.

174
00:06:54,050 --> 00:06:56,060
>> Hivyo hii wazo la hashing
kwamba utaona ni

175
00:06:56,060 --> 00:07:00,520
nguvu kabisa ni kweli pretty
kawaida na Intuitive sana,

176
00:07:00,520 --> 00:07:03,000
kiasi kama labda kugawanya na
kushinda alikuwa katika wiki sifuri.

177
00:07:03,000 --> 00:07:05,250
Mimi mbele kwa haraka na hackathon
miaka michache iliyopita.

178
00:07:05,250 --> 00:07:08,040
Hii ilikuwa Zamyla na michache ya
mengine ya wanafunzi wafanyakazi salamu

179
00:07:08,040 --> 00:07:09,030
walipokuwa katika.

180
00:07:09,030 --> 00:07:12,680
Na tulikuwa na rundo zima la Folding
meza kuna na vitambulisho jina.

181
00:07:12,680 --> 00:07:15,380
Na tulikuwa na vitambulisho jina kupangwa
na kama Kama zaidi ya hapo

182
00:07:15,380 --> 00:07:16,690
na ZS zaidi ya hapo.

183
00:07:16,690 --> 00:07:20,350
Na hivyo moja ya TFS cleverly sana
aliandika hii kama maelekezo

184
00:07:20,350 --> 00:07:21,030
kwa siku.

185
00:07:21,030 --> 00:07:24,480
Na katika wiki ya 12 ya muhula hii
yote yaliyotolewa akili kamilifu na kila mtu

186
00:07:24,480 --> 00:07:25,310
alijua nini cha kufanya.

187
00:07:25,310 --> 00:07:27,900
Lakini wakati wowote wameweza
queued katika njia hiyo hiyo,

188
00:07:27,900 --> 00:07:30,272
wewe ni kutekeleza
dhana hiyo ya hash.

189
00:07:30,272 --> 00:07:31,730
Basi hebu kurasimisha ni kidogo.

190
00:07:31,730 --> 00:07:32,890
Hapa ni safu.

191
00:07:32,890 --> 00:07:36,820
Ni inayotolewa kwa kuwa ni kidogo
pana tu depict, kuibua,

192
00:07:36,820 --> 00:07:38,920
tupate kuweka masharti
katika kitu kama hiki.

193
00:07:38,920 --> 00:07:41,970
Na safu hii ni
wazi ya jumla ukubwa 26.

194
00:07:41,970 --> 00:07:43,935
Na jambo inaitwa
meza kiholela.

195
00:07:43,935 --> 00:07:48,930
Lakini hii ni tu mpenyo msanii
nini meza hash inaweza kuwa.

196
00:07:48,930 --> 00:07:52,799
>> Hivyo meza hash sasa ni kwenda
kuwa juu ya muundo data ngazi.

197
00:07:52,799 --> 00:07:54,840
Mwisho wa siku
sisi ni juu ya kuona kwamba

198
00:07:54,840 --> 00:07:58,700
unaweza kutekeleza hash meza, ambayo
ni kiasi kama line kuangalia katika

199
00:07:58,700 --> 00:08:02,059
katika hackathon kiasi kama hii
meza kutumika kwa ajili ya kuchagua vitabu mtihani.

200
00:08:02,059 --> 00:08:03,850
Lakini meza hash ni
aina ya ngazi hii ya juu

201
00:08:03,850 --> 00:08:08,250
dhana kwamba inaweza kutumia safu
chini ya kofia ya kutekeleza,

202
00:08:08,250 --> 00:08:11,890
au inaweza kutumia orodha urefu, au hata
labda baadhi wengine miundo data.

203
00:08:11,890 --> 00:08:15,590
Na sasa kwamba kuchukua theme--
baadhi ya viungo haya ya msingi

204
00:08:15,590 --> 00:08:18,310
kama safu na jengo hili
kuzuia sasa ya orodha urefu

205
00:08:18,310 --> 00:08:21,740
na kuona nini kingine tunaweza kujenga
juu ya wale, kama viungo

206
00:08:21,740 --> 00:08:26,550
ndani ya kichocheo, na kufanya zaidi na zaidi
kuvutia na manufaa ya mwisho matokeo.

207
00:08:26,550 --> 00:08:28,680
>> Hivyo pamoja na meza hash
tupate kutekeleza

208
00:08:28,680 --> 00:08:32,540
katika kumbukumbu pictorially kama hii, lakini
jinsi gani ni kweli kuwa kutolewa up?

209
00:08:32,540 --> 00:08:33,789
Vizuri, labda kama tu ni hii.

210
00:08:33,789 --> 00:08:38,270
Kama UWEZO katika mechi zote, ni tu
baadhi constant-- kwa mfano 26,

211
00:08:38,270 --> 00:08:42,030
kwa herufi 26 ya alphabet--
Nipate kuwaita meza yangu variable,

212
00:08:42,030 --> 00:08:45,630
na mimi ili kudai kwamba mimi nina kwenda
kuweka nyota Char huko, au kamba.

213
00:08:45,630 --> 00:08:49,880
Hivyo ni rahisi kama hii kama wewe
wanataka kutekeleza meza hash.

214
00:08:49,880 --> 00:08:51,490
Na bado, hii ni kweli tu safu.

215
00:08:51,490 --> 00:08:53,198
Lakini tena, hash
meza ni sasa nini tutaweza

216
00:08:53,198 --> 00:08:57,470
kuwaita data abstract aina hiyo ni
aina ya layering dhana juu

217
00:08:57,470 --> 00:09:00,780
wa kitu zaidi mundane
sasa kama safu.

218
00:09:00,780 --> 00:09:02,960
>> Sasa, jinsi gani sisi kwenda
kuhusu kutatua matatizo?

219
00:09:02,960 --> 00:09:06,980
Naam, awali nilikuwa anasa
ya kuwa na nafasi ya kutosha meza hapa

220
00:09:06,980 --> 00:09:09,460
ili niweze kuweka
Quizzes popote nilitaka.

221
00:09:09,460 --> 00:09:10,620
Hivyo Kama wanaweza kwenda hapa.

222
00:09:10,620 --> 00:09:12,100
ZS wanaweza kwenda hapa.

223
00:09:12,100 --> 00:09:13,230
Bi wanaweza kwenda hapa.

224
00:09:13,230 --> 00:09:14,740
Na kisha mimi alikuwa na baadhi ya nafasi ya ziada.

225
00:09:14,740 --> 00:09:18,740
Lakini hii ni kidogo ya kudanganya haki
sasa kwa sababu meza hii, kama kweli

226
00:09:18,740 --> 00:09:22,720
mawazo ya kama safu, ni tu
itakuwa ya baadhi ya kawaida fasta.

227
00:09:22,720 --> 00:09:25,380
>> Basi kitaalam, kama mimi kuvuta
up jaribio mwanafunzi mwingine

228
00:09:25,380 --> 00:09:28,490
na kuona, oh, mtu huyu
jina huanza na A pia,

229
00:09:28,490 --> 00:09:30,980
Mimi aina ya kutaka kuiweka huko.

230
00:09:30,980 --> 00:09:34,740
Lakini haraka kama mimi kuiweka huko, kama
meza hii kweli inawakilisha safu,

231
00:09:34,740 --> 00:09:37,840
Mimi nina kwenda kuwa kuu au clobbering
yeyote Jaribio mwanafunzi huu ni.

232
00:09:37,840 --> 00:09:38,340
Haki?

233
00:09:38,340 --> 00:09:41,972
Kama hii ni safu, jambo moja tu unaweza
kwenda katika kila moja ya seli hizi au vipengele.

234
00:09:41,972 --> 00:09:43,680
Na hivyo mimi aina ya kuwa
kuchukua na kuchagua.

235
00:09:43,680 --> 00:09:45,735
>> Sasa mapema Mimi aina ya
cheated na alifanya hii au mimi

236
00:09:45,735 --> 00:09:47,526
tu aina ya sifa
yao juu ya kila mmoja.

237
00:09:47,526 --> 00:09:49,170
Lakini kwamba si kwenda kuruka katika kanuni.

238
00:09:49,170 --> 00:09:52,260
Hivyo ambapo naweza kuweka
mwanafunzi wa pili jina lake

239
00:09:52,260 --> 00:09:54,964
A ni kama wote nilikuwa ni hii
inapatikana meza nafasi?

240
00:09:54,964 --> 00:09:57,880
Na nimekuwa kutumika inafaa tatu na
Inaonekana kama kuna wengine chache tu.

241
00:09:57,880 --> 00:09:58,959
Unaweza kufanya nini?

242
00:09:58,959 --> 00:09:59,834
Watazamaji: [inaudible]

243
00:09:59,834 --> 00:10:00,565

244
00:10:00,565 --> 00:10:01,315
DAVID Malan: Yeah.

245
00:10:01,315 --> 00:10:02,370
Labda hebu tu kushika ni rahisi.

246
00:10:02,370 --> 00:10:02,660
Haki?

247
00:10:02,660 --> 00:10:04,243
Haina fit ambapo nataka kuweka.

248
00:10:04,243 --> 00:10:07,450
Hivyo nina kwenda kwa kuiweka
kitaalam ambapo B aliamua kwenda.

249
00:10:07,450 --> 00:10:09,932
Sasa, bila shaka, mimi nina kuanza
rangi mwenyewe katika kona.

250
00:10:09,932 --> 00:10:11,890
Kama mimi kupata mwanafunzi
ambaye jina lake ni kweli B,

251
00:10:11,890 --> 00:10:14,840
sasa B ni kwenda kuwa wakiongozwa kidogo
mbele, kama inaweza kutokea, yep,

252
00:10:14,840 --> 00:10:17,530
kama hii ni B, sasa ina kwenda hapa.

253
00:10:17,530 --> 00:10:20,180
>> Na hivyo hii haraka sana
inaweza kuwa tatizo,

254
00:10:20,180 --> 00:10:23,850
lakini ni mbinu ambayo kweli
ni inajulikana kama linear uchunguzi,

255
00:10:23,850 --> 00:10:26,650
ambapo wewe tu kufikiria yako
safu kuwa pamoja mstari.

256
00:10:26,650 --> 00:10:29,680
Na wewe tu aina ya kuchunguza au
kukagua kila kipengele inapatikana

257
00:10:29,680 --> 00:10:31,360
kuangalia kwa doa inapatikana.

258
00:10:31,360 --> 00:10:34,010
Na haraka kama wewe kupata
moja, wewe kushuka huko.

259
00:10:34,010 --> 00:10:38,390
>> Sasa, bei kulipwa sasa
kwa ufumbuzi huu ni nini?

260
00:10:38,390 --> 00:10:41,300
Tuna fasta ukubwa safu,
na wakati mimi kuingiza majina

261
00:10:41,300 --> 00:10:44,059
ndani yake, angalau awali, nini
wakati mbio za insertion

262
00:10:44,059 --> 00:10:46,350
kwa ajili ya kuweka ya wanafunzi '
Quizzes katika ndoo haki?

263
00:10:46,350 --> 00:10:48,710

264
00:10:48,710 --> 00:10:50,002
Big O nini?

265
00:10:50,002 --> 00:10:51,147
>> Watazamaji: n.

266
00:10:51,147 --> 00:10:52,480
DAVID Malan: nikasikia O kubwa ya n.

267
00:10:52,480 --> 00:10:53,530

268
00:10:53,530 --> 00:10:54,300
Si kweli.

269
00:10:54,300 --> 00:10:56,490
Lakini tutaweza tease mbali
nini katika muda tu.

270
00:10:56,490 --> 00:10:57,702
Nini kingine inaweza kuwa kitu gani?

271
00:10:57,702 --> 00:10:58,755
>> Watazamaji: [inaudible]

272
00:10:58,755 --> 00:11:00,380
DAVID Malan: Na napenda kufanya hivyo kuibua.

273
00:11:00,380 --> 00:11:04,720
Hivyo tuseme hii ni barua S.

274
00:11:04,720 --> 00:11:05,604
>> Watazamaji: Ni moja.

275
00:11:05,604 --> 00:11:06,520
DAVID Malan: Ni moja.

276
00:11:06,520 --> 00:11:06,710
Haki?

277
00:11:06,710 --> 00:11:08,950
Hii ni safu, ambayo
ina maana sisi kupata random.

278
00:11:08,950 --> 00:11:11,790
Na kama sisi kufikiri ya hii
kama sifuri na hii kama 25,

279
00:11:11,790 --> 00:11:13,800
na sisi kutambua kwamba,
oh, hapa pembejeo yangu S,

280
00:11:13,800 --> 00:11:16,350
Mimi tunaweza kubadilisha
S, tabia ASCII,

281
00:11:16,350 --> 00:11:18,540
kwa idadi inayolingana
kati ya sifuri na 25

282
00:11:18,540 --> 00:11:20,910
na kisha mara moja
kuiweka ambapo ni mali.

283
00:11:20,910 --> 00:11:26,120
>> Lakini bila shaka, haraka kama mimi kupata
mtu wa pili ambaye ni jina ni A au B au C

284
00:11:26,120 --> 00:11:29,300
hatimaye, kama nimekuwa kutumika
linear uchunguzi kama ufumbuzi yangu,

285
00:11:29,300 --> 00:11:31,360
wakati mbio za
insertion katika kesi mbaya

286
00:11:31,360 --> 00:11:33,120
ni kweli kwenda devolve katika nini?

287
00:11:33,120 --> 00:11:34,270

288
00:11:34,270 --> 00:11:36,045
Na mimi kusikia hapa
usahihi mapema.

289
00:11:36,045 --> 00:11:36,920
Watazamaji: [inaudible]

290
00:11:36,920 --> 00:11:41,620
DAVID Malan: Hivyo ni kweli n mara moja
una kubwa ya kutosha data kuweka.

291
00:11:41,620 --> 00:11:44,410
Hivyo, kwa upande mmoja, kama
safu yako ni kubwa ya kutosha

292
00:11:44,410 --> 00:11:48,287
na data yako ni sparse kutosha,
kupata muda huu mzuri wa mara kwa mara.

293
00:11:48,287 --> 00:11:50,620
Lakini haraka kama wewe kuanza
kupata mambo zaidi na zaidi,

294
00:11:50,620 --> 00:11:53,200
na tu kitakwimu kupata
watu zaidi na barua

295
00:11:53,200 --> 00:11:56,030
kama jina yao au barua
B, inaweza uwezekano

296
00:11:56,030 --> 00:11:57,900
kukabidhi katika kitu zaidi linear.

297
00:11:57,900 --> 00:11:59,640
Hivyo si kabisa kamilifu.

298
00:11:59,640 --> 00:12:00,690
Hivyo tunaweza kufanya vizuri zaidi?

299
00:12:00,690 --> 00:12:03,210
>> Naam, nini ilikuwa wetu
ufumbuzi kabla ya wakati sisi

300
00:12:03,210 --> 00:12:06,820
wanataka kuwa zaidi kuliko mabadiliko
kitu kama safu kuruhusiwa?

301
00:12:06,820 --> 00:12:08,085

302
00:12:08,085 --> 00:12:08,960
Watazamaji: [inaudible]

303
00:12:08,960 --> 00:12:10,030
DAVID Malan: Je, sisi kuanzisha?

304
00:12:10,030 --> 00:12:10,530
Yeah.

305
00:12:10,530 --> 00:12:11,430
Hivyo orodha wanaohusishwa.

306
00:12:11,430 --> 00:12:14,430
Naam, hebu angalia nini wanaohusishwa
orodha inaweza kufanya kwa ajili yetu badala yake.

307
00:12:14,430 --> 00:12:17,630
Naam, napenda kupendekeza kwamba sisi
kuchora picha kama ifuatavyo.

308
00:12:17,630 --> 00:12:19,620
Sasa hii ni tofauti
picha kutoka kwa mfano

309
00:12:19,620 --> 00:12:24,750
kutoka Nakala tofauti, kwa kweli, kwamba
ni kweli kutumia safu ya ukubwa 31.

310
00:12:24,750 --> 00:12:28,220
Na mwandishi hii tu
aliamua hash masharti

311
00:12:28,220 --> 00:12:32,430
si kulingana na majina ya mtu,
lakini kulingana na birthdates yao.

312
00:12:32,430 --> 00:12:35,680
Bila kujali mwezi, wao figured
kama wewe ni mzaliwa wa siku ya kwanza ya mwezi

313
00:12:35,680 --> 00:12:39,580
au 31 ya mwezi, mwandishi
itakuwa hash kulingana na thamani ya kwamba,

314
00:12:39,580 --> 00:12:44,154
ili kuenea majina nje kidogo
zaidi kuliko tu 26 matangazo ili kuruhusu.

315
00:12:44,154 --> 00:12:47,320
Na labda ni kidogo zaidi sare
kuliko kwenda kwa herufi herufi,

316
00:12:47,320 --> 00:12:50,236
kwa sababu bila shaka kuna pengine
watu zaidi katika dunia na majina

317
00:12:50,236 --> 00:12:54,020
kwamba kuanza na kuliko kwa hakika
baadhi ya barua nyingine ya alfabeti.

318
00:12:54,020 --> 00:12:56,380
Hivyo labda hii ni kidogo
sare zaidi, kuchukua

319
00:12:56,380 --> 00:12:58,640
usambazaji sare
ya watoto katika mwezi.

320
00:12:58,640 --> 00:12:59,990
>> Lakini, bila shaka, hii ni bado kamili.

321
00:12:59,990 --> 00:13:00,370
Haki?

322
00:13:00,370 --> 00:13:01,370
Sisi ni kuwa migongano.

323
00:13:01,370 --> 00:13:04,680
Watu mbalimbali katika hii
Muundo data bado

324
00:13:04,680 --> 00:13:08,432
kuwa tarehe ya kuzaliwa sawa angalau
wewe ni bila ya kujali kwa mwezi.

325
00:13:08,432 --> 00:13:09,640
Lakini kile mwandishi kosa gani?

326
00:13:09,640 --> 00:13:13,427
Naam, inaonekana kama tuna safu
upande wa kushoto mkono inayotolewa wima,

327
00:13:13,427 --> 00:13:15,010
lakini hiyo ni mpenyo msanii.

328
00:13:15,010 --> 00:13:18,009
Haijalishi nini mwelekeo
kuteka safu, bado safu.

329
00:13:18,009 --> 00:13:20,225
Ni nini hii safu ya inaonekana?

330
00:13:20,225 --> 00:13:21,500
>> Watazamaji: Wanaohusishwa orodha.

331
00:13:21,500 --> 00:13:21,650
>> DAVID Malan: Yeah.

332
00:13:21,650 --> 00:13:23,490
Inaonekana kama ni
safu ya orodha wanaohusishwa.

333
00:13:23,490 --> 00:13:26,490
Hivyo tena, hatua hii ya aina
ya kutumia miundo hizi data sasa

334
00:13:26,490 --> 00:13:28,550
kama viungo zaidi
ufumbuzi kuvutia,

335
00:13:28,550 --> 00:13:30,862
unaweza kabisa kuchukua
msingi, kama safu,

336
00:13:30,862 --> 00:13:33,320
na kisha kuchukua kitu zaidi
kuvutia kama orodha wanaohusishwa

337
00:13:33,320 --> 00:13:36,660
na hata kuchanganya yao katika hata
zaidi ya kuvutia data muundo.

338
00:13:36,660 --> 00:13:39,630
Na kwa kweli, hii pia ingekuwa
kuitwa meza hash,

339
00:13:39,630 --> 00:13:42,610
ambapo safu ni
kweli meza hash,

340
00:13:42,610 --> 00:13:45,600
lakini kwamba meza hash ina
minyororo, ili kuzungumza,

341
00:13:45,600 --> 00:13:50,220
ambayo inaweza kukua au kuogopa kulingana na
idadi ya vipengele unataka kuingiza.

342
00:13:50,220 --> 00:13:52,990
>> Sasa, ipasavyo, nini
mbio wakati sasa?

343
00:13:52,990 --> 00:13:58,030
Kama nataka kuingiza mtu
ambao siku ya kuzaliwa ni Oktoba 31,

344
00:13:58,030 --> 00:13:59,040
ambapo haina yeye au yeye kwenda?

345
00:13:59,040 --> 00:14:00,530

346
00:14:00,530 --> 00:14:01,030
Wote haki.

347
00:14:01,030 --> 00:14:02,819
Chini sana ambapo anasema 31.

348
00:14:02,819 --> 00:14:03,610
Na kwamba ni kamilifu.

349
00:14:03,610 --> 00:14:05,060
Hiyo ilikuwa mara ya mara kwa mara.

350
00:14:05,060 --> 00:14:08,760
Lakini nini kama sisi kupata mtu mwingine
ambao siku ya kuzaliwa ni, hebu angalia,

351
00:14:08,760 --> 00:14:10,950
Oktoba, Novemba, Desemba 31?

352
00:14:10,950 --> 00:14:12,790
Ambapo ni yeye au yeye kwenda?

353
00:14:12,790 --> 00:14:13,290
Same kitu.

354
00:14:13,290 --> 00:14:13,970
Hatua mbili ingawa.

355
00:14:13,970 --> 00:14:15,303
Hiyo ni mara kwa mara ingawa si hivyo?

356
00:14:15,303 --> 00:14:16,360

357
00:14:16,360 --> 00:14:16,860
Wote haki.

358
00:14:16,860 --> 00:14:17,840
Kwa sasa ni.

359
00:14:17,840 --> 00:14:20,570
Lakini katika kesi ujumla,
watu zaidi sisi kuongeza,

360
00:14:20,570 --> 00:14:23,790
probabilistically, tunakwenda
kupata collisions zaidi na zaidi.

361
00:14:23,790 --> 00:14:26,820
>> Sasa hii ni kidogo
bora kwa sababu kitaalam

362
00:14:26,820 --> 00:14:34,580
sasa kifungoni inaweza kuwa katika
kesi mbaya kwa muda gani?

363
00:14:34,580 --> 00:14:38,890
Kama mimi kuingiza n watu katika hii zaidi
Muundo wa kisasa data, n watu,

364
00:14:38,890 --> 00:14:41,080
katika kesi mbaya ni kwenda kuwa n.

365
00:14:41,080 --> 00:14:41,815
Kwa nini?

366
00:14:41,815 --> 00:14:43,332
>> Watazamaji: Kwa sababu kama kila mtu
ina siku ya kuzaliwa huo,

367
00:14:43,332 --> 00:14:44,545
wao ni kwenda kuwa mstari mmoja.

368
00:14:44,545 --> 00:14:45,420
DAVID Malan: Perfect.

369
00:14:45,420 --> 00:14:47,480
Ni inaweza kuwa ni kidogo contrived,
lakini kweli katika kesi mbaya,

370
00:14:47,480 --> 00:14:50,117
kama kila mtu ana siku ya kuzaliwa huo,
kupewa pembejeo una,

371
00:14:50,117 --> 00:14:51,950
wewe ni kwenda kuwa na
massively mlolongo mrefu.

372
00:14:51,950 --> 00:14:54,241
Na hivyo, unaweza kuiita
hash meza, lakini kwa kweli ni

373
00:14:54,241 --> 00:14:56,810
tu kubwa wanaohusishwa orodha kwa
mengi yote ya kupita nafasi.

374
00:14:56,810 --> 00:15:00,460
Lakini kwa ujumla, kama sisi kudhani kwamba
angalau siku za kuzaliwa ni uniform--

375
00:15:00,460 --> 00:15:01,750
na pengine si.

376
00:15:01,750 --> 00:15:02,587
Mimi nina kufanya kwamba up.

377
00:15:02,587 --> 00:15:04,420
Lakini kama sisi kudhani, kwa
ajili ya majadiliano

378
00:15:04,420 --> 00:15:07,717
kwamba wao ni, basi katika nadharia, kama
hii ni ya uwakilishi wima

379
00:15:07,717 --> 00:15:11,050
wa safu, vizuri basi hopefully wewe ni
kwenda kupata minyororo kwamba ni, unajua,

380
00:15:11,050 --> 00:15:15,880
takribani urefu huo ambapo kila mmoja
hizi inawakilisha siku ya mwezi.

381
00:15:15,880 --> 00:15:19,930
>> Sasa kama kuna siku 31 katika mwezi,
hiyo ina maana mbio wangu wakati kweli

382
00:15:19,930 --> 00:15:25,230
ni O kubwa ya n juu ya 31, ambayo
anahisi bora kuliko linear.

383
00:15:25,230 --> 00:15:27,950
Lakini nini alikuwa mmoja wa wetu
ahadi wiki kadhaa

384
00:15:27,950 --> 00:15:31,145
iliyopita wakati wowote alikuja kuonyesha
wakati wa algorithm mbio?

385
00:15:31,145 --> 00:15:33,450

386
00:15:33,450 --> 00:15:35,190
Tu tu kuangalia juu ili mfupi.

387
00:15:35,190 --> 00:15:35,690
Haki?

388
00:15:35,690 --> 00:15:37,400
31 ni dhahiri manufaa.

389
00:15:37,400 --> 00:15:39,610
Lakini hii bado O kubwa ya n.

390
00:15:39,610 --> 00:15:41,730
Lakini moja ya mandhari
tatizo kuweka tano

391
00:15:41,730 --> 00:15:43,950
ni kwenda kuwa na
kukiri kwamba kabisa,

392
00:15:43,950 --> 00:15:47,320
asymptotically, kinadharia
muundo huu data

393
00:15:47,320 --> 00:15:50,470
hakuna bora kuliko tu
moja kubwa wanaohusishwa orodha.

394
00:15:50,470 --> 00:15:53,550
Na kwa kweli, katika kesi mbaya, hii
hash meza inaweza kukabidhi katika hiyo.

395
00:15:53,550 --> 00:15:57,620
>> Lakini katika ulimwengu wa kweli, na sisi binadamu
kwamba Macs mwenyewe au PC au chochote

396
00:15:57,620 --> 00:16:01,240
na ni mbio ulimwengu halisi
programu kwenye data halisi ya dunia,

397
00:16:01,240 --> 00:16:03,260
ambayo algorithm ni wewe kwenda kupendelea?

398
00:16:03,260 --> 00:16:09,180
moja kwamba inachukua hatua ya mwisho au
moja kwamba inachukua n kugawanywa na hatua 31

399
00:16:09,180 --> 00:16:12,900
kupata baadhi ya kipande cha data au
kuangalia juu ya baadhi ya taarifa?

400
00:16:12,900 --> 00:16:16,580
I mean, kabisa 31 hufanya
tofauti katika ulimwengu wa kweli.

401
00:16:16,580 --> 00:16:18,540
Ni mara 31 kwa kasi zaidi.

402
00:16:18,540 --> 00:16:20,880
Na sisi wanadamu ni hakika
kwenda kufahamu kwamba.

403
00:16:20,880 --> 00:16:23,004
>> Hivyo kutambua dichotomy
kuna kati ya kweli

404
00:16:23,004 --> 00:16:25,920
kuzungumza juu ya mambo kinadharia
na asymptotically ambayo dhahiri

405
00:16:25,920 --> 00:16:28,760
ina thamani kama tumeona,
lakini katika ulimwengu wa kweli,

406
00:16:28,760 --> 00:16:32,930
kama huduma ya juu maamuzi tu
furaha ya binadamu kwa ajili ya pembejeo kwa ujumla,

407
00:16:32,930 --> 00:16:36,010
unaweza vizuri sana wanataka kukubali
ukweli kwamba, ndiyo, hii ni linear,

408
00:16:36,010 --> 00:16:38,360
lakini ni mara 31 kwa kasi
kuliko linear inaweza kuwa.

409
00:16:38,360 --> 00:16:41,610
Na bado bora, sisi si tu na
kufanya kitu kiholela kama tarehe ya kuzaliwa,

410
00:16:41,610 --> 00:16:44,030
tunaweza kutumia kidogo
muda zaidi na ujanja

411
00:16:44,030 --> 00:16:47,140
na kufikiri kuhusu nini sisi tupate kufanya,
kupewa jina la mtu na labda

412
00:16:47,140 --> 00:16:50,130
tarehe ya kuzaliwa yao kwa kuchanganya wale
viungo kufikiri kitu

413
00:16:50,130 --> 00:16:52,720
kwamba ni kweli zaidi
sare na chini jaggy,

414
00:16:52,720 --> 00:16:56,250
hivyo kusema kuliko picha hii
sasa unaonyesha inaweza kuwa.

415
00:16:56,250 --> 00:16:57,750
Jinsi gani sisi kutekeleza hili katika kanuni?

416
00:16:57,750 --> 00:17:00,280
Naam, napenda kupendekeza kwamba sisi
tu kukopa baadhi syntax tumekuwa

417
00:17:00,280 --> 00:17:01,799
kutumika mara kadhaa hivi sasa.

418
00:17:01,799 --> 00:17:03,590
Na mimi nina kwenda kufafanua
nodi, ambayo tena

419
00:17:03,590 --> 00:17:06,812
ni mrefu generic kwa baadhi tu
chombo kwa ajili ya baadhi ya muundo data.

420
00:17:06,812 --> 00:17:09,020
Mimi nina kwenda kupendekeza kwamba
kamba ni kwenda huko.

421
00:17:09,020 --> 00:17:11,369
Lakini sisi ni kwenda kuanza kuchukua
wale mafunzo magurudumu mbali sasa.

422
00:17:11,369 --> 00:17:13,230
>> Hakuna zaidi CS50 maktaba
kweli, isipokuwa unataka

423
00:17:13,230 --> 00:17:15,230
kuitumia kwa ajili ya fainali yako
mradi, ambayo ni mzuri,

424
00:17:15,230 --> 00:17:18,569
lakini sasa tunakwenda kuvuta nyuma
pazia na kusema ni tu nyota Char.

425
00:17:18,569 --> 00:17:22,069
Hivyo neno kuna ni kwenda kuwa na
jina la mtu katika swali.

426
00:17:22,069 --> 00:17:25,079
Na sasa nina kiungo
hapa nodi ijayo

427
00:17:25,079 --> 00:17:28,170
hivyo kwamba hawa kuwakilisha
kila nodes

428
00:17:28,170 --> 00:17:30,950
katika mlolongo, uwezekano,
ya orodha wanaohusishwa.

429
00:17:30,950 --> 00:17:34,090
>> Na sasa jinsi ya kufanya Mimi kutangaza
hash meza yenyewe?

430
00:17:34,090 --> 00:17:36,660
Je, mimi kutangaza muundo huu wote?

431
00:17:36,660 --> 00:17:40,960
Vizuri, kwa kweli, kiasi kama mimi kutumika pointer
tu kipengele kwanza ya orodha

432
00:17:40,960 --> 00:17:44,510
kabla, vile vile naweza kusema tu
Mimi tu haja rundo la kuyatumia

433
00:17:44,510 --> 00:17:46,270
kutekeleza hash hii nzima meza.

434
00:17:46,270 --> 00:17:49,484
Mimi nina kwenda kuwa safu
aitwaye meza hash meza kwa.

435
00:17:49,484 --> 00:17:50,900
Ni kwenda kuwa ukubwa wa uwezo.

436
00:17:50,900 --> 00:17:52,525
Hiyo ni jinsi mambo mengi unaweza fit katika hilo.

437
00:17:52,525 --> 00:17:56,180
Na kila moja ya mambo hayo katika hii
safu ni kwenda kuwa nyota nodi.

438
00:17:56,180 --> 00:17:56,810
Kwa nini?

439
00:17:56,810 --> 00:18:00,160
Naam, kwa picha hii, nini mimi nina
kutekeleza hash meza kama

440
00:18:00,160 --> 00:18:04,330
ufanisi katika mwanzo tu
safu hii kwamba tumepata wima,

441
00:18:04,330 --> 00:18:06,820
kila mmoja wa viwanja ambao
inawakilisha pointer.

442
00:18:06,820 --> 00:18:09,170
Kwamba wale ambao mikwaju
njia yao ni tu null.

443
00:18:09,170 --> 00:18:11,410
Na wale ambao
mishale ya kwenda haki

444
00:18:11,410 --> 00:18:16,140
ni kuyatumia halisi kwa nodes halisi,
Ergo mwanzo wa orodha wanaohusishwa.

445
00:18:16,140 --> 00:18:19,050
>> Hivyo hapa, basi, ni jinsi sisi anaweza
kutekeleza meza hash kwamba

446
00:18:19,050 --> 00:18:21,580
kutekeleza tofauti chaining.

447
00:18:21,580 --> 00:18:22,840
Sasa tunaweza kufanya vizuri zaidi?

448
00:18:22,840 --> 00:18:25,632
Haki zote mimi aliahidi mara ya mwisho kwamba
tunaweza kufikia wakati wa mara kwa mara.

449
00:18:25,632 --> 00:18:27,381
Na mimi aina ya alitoa wewe
wakati mara kwa mara hapa,

450
00:18:27,381 --> 00:18:29,850
lakini basi alisema si kweli
wakati mara kwa mara kwa sababu ni bado

451
00:18:29,850 --> 00:18:31,890
tegemezi jumla
idadi ya vipengele

452
00:18:31,890 --> 00:18:34,500
wewe ni inputting katika
data ya muundo.

453
00:18:34,500 --> 00:18:35,980
Lakini tuseme sisi alifanya hivyo.

454
00:18:35,980 --> 00:18:39,550
Napenda kwenda nyuma ya screen ya juu hapa.

455
00:18:39,550 --> 00:18:44,520
Napenda pia mradi huu hadi hapa, wazi
screen, na nadhani alifanya hivyo.

456
00:18:44,520 --> 00:18:49,300
Tuseme nilitaka kuingiza jina
Daven katika katika muundo wangu data.

457
00:18:49,300 --> 00:18:52,100
>> Hivyo nataka kuingiza kamba
Daven katika muundo data.

458
00:18:52,100 --> 00:18:54,370
Nini kama mimi si kutumia
hash meza, lakini mimi kutumia

459
00:18:54,370 --> 00:18:56,980
kitu ambacho ni zaidi ya mti-kama
kama familia mti, ambapo

460
00:18:56,980 --> 00:18:59,670
una baadhi ya mizizi katika
nodes juu na kisha na majani

461
00:18:59,670 --> 00:19:01,440
kwamba kwenda kushuka na nje.

462
00:19:01,440 --> 00:19:04,450
Tuseme basi, kwamba mimi
wanataka kuingiza Daven ya

463
00:19:04,450 --> 00:19:06,430
ndani ya nini sasa orodha tupu.

464
00:19:06,430 --> 00:19:09,780
Mimi nina kwenda kufanya yafuatayo: Mimi nina
kwenda kujenga nodi katika familia hii

465
00:19:09,780 --> 00:19:15,170
mti-kama muundo data kwamba inaonekana
kidogo kama hii, ambayo kila mmoja

466
00:19:15,170 --> 00:19:19,640
mistatili ina, hebu sema,
kwa sasa 26 mambo ndani yake.

467
00:19:19,640 --> 00:19:21,650
Na kila seli
katika safu hii ni kwenda

468
00:19:21,650 --> 00:19:23,470
kuwakilisha barua ya alfabeti.

469
00:19:23,470 --> 00:19:28,190
>> Hasa, mimi nina kwenda kutibu
hii ni, basi B, basi C, basi D,

470
00:19:28,190 --> 00:19:29,310
hii moja hapa.

471
00:19:29,310 --> 00:19:32,940
Hivyo hii ni kwenda kwa ufanisi
kuwakilisha barua D.

472
00:19:32,940 --> 00:19:36,040
Lakini kuingiza yote ya Daven ya
jina mimi haja ya kufanya kidogo zaidi.

473
00:19:36,040 --> 00:19:37,840
Hivyo mimi nina kwanza kwenda hash, hivyo kusema.

474
00:19:37,840 --> 00:19:41,049
Mimi nina kwenda kuangalia barua ya kwanza
katika Daven ambayo ni wazi D,

475
00:19:41,049 --> 00:19:42,840
na mimi nina kwenda kutenga
nodi kwamba inaonekana

476
00:19:42,840 --> 00:19:45,570
kama this-- Mstatili kubwa kubwa
kutosha fit alfabeti nzima.

477
00:19:45,570 --> 00:19:47,140
>> Sasa D ni kosa.

478
00:19:47,140 --> 00:19:49,720
Sasa A. D-A-V-E-N ni lengo.

479
00:19:49,720 --> 00:19:51,220
Hivyo sasa nini mimi kwenda kufanya ni hii.

480
00:19:51,220 --> 00:19:54,027
Haraka kama mimi kuanza D taarifa
hakuna pointer huko.

481
00:19:54,027 --> 00:19:56,860
Ni wakati maadili ya takataka,
au mimi ili initialize kwa null.

482
00:19:56,860 --> 00:19:59,630
Lakini ngoja kuendelea na
wazo hili la kujenga mti.

483
00:19:59,630 --> 00:20:04,260
Napenda kutenga mwingine mmoja wa haya
nodes kwamba ina mambo 26 ndani yake.

484
00:20:04,260 --> 00:20:05,150
>> Na unajua nini?

485
00:20:05,150 --> 00:20:09,130
Kama hii ni tu nodi katika kumbukumbu kwamba
Mimi iliundwa na malloc, kwa kutumia struct

486
00:20:09,130 --> 00:20:11,240
kama tutaweza hivi karibuni kuona,
Mimi nina kwenda kufanya this--

487
00:20:11,240 --> 00:20:14,450
Mimi nina kwenda kuteka mshale kutoka
Jambo kwamba kuwakilishwa D chini

488
00:20:14,450 --> 00:20:15,860
nodi hii mpya.

489
00:20:15,860 --> 00:20:19,240
Na sasa, kwanza ijayo
barua katika jina Daven wa,

490
00:20:19,240 --> 00:20:24,150
V-- D-A-V-- mimi nina kwenda mbele
na kuteka nodi mwingine kama huu,

491
00:20:24,150 --> 00:20:30,150
ambapo, V mambo hapa, ambayo
tutaweza kuteka kwa whoops instance--.

492
00:20:30,150 --> 00:20:31,020
Sisi si kuteka huko.

493
00:20:31,020 --> 00:20:31,936
Ni kwenda hapa.

494
00:20:31,936 --> 00:20:32,890

495
00:20:32,890 --> 00:20:35,712
>> Kisha tunakwenda
kufikiria hili kuwa V.

496
00:20:35,712 --> 00:20:44,920
Na kisha chini hapa tunakwenda index
chini kutoka V katika kile tutaweza kufikiria E.

497
00:20:44,920 --> 00:20:50,100
Na kisha kutoka hapa tunakwenda
kwenda kuwa moja ya nodes hizi hapa.

498
00:20:50,100 --> 00:20:52,930
Na sasa tuna swali kujibu.

499
00:20:52,930 --> 00:20:57,840
Mimi haja ya namna fulani zinaonyesha kwamba
tuko katika mwisho wa kamba Daven.

500
00:20:57,840 --> 00:20:59,490
Ili niweze kuondoka tu null.

501
00:20:59,490 --> 00:21:02,670
>> Lakini nini kama tuna Daven ya
jina kamili pia, ambayo

502
00:21:02,670 --> 00:21:04,280
yaani, kama tumekuwa alisema, Davenport?

503
00:21:04,280 --> 00:21:06,970
Basi nini kama Daven ni
kweli substring,

504
00:21:06,970 --> 00:21:08,960
kiambishi ya kamba sana tena?

505
00:21:08,960 --> 00:21:11,450
Hatuwezi tu kudumu
kusema chochote ni kwenda

506
00:21:11,450 --> 00:21:14,410
kwenda huko, kwa sababu tunaweza
kamwe kuingiza neno kama Davenport

507
00:21:14,410 --> 00:21:15,840
ndani ya hii Muundo data

508
00:21:15,840 --> 00:21:19,560
>> Hivyo nini tunaweza kufanya badala ni
kutibu kila ya mambo haya

509
00:21:19,560 --> 00:21:22,170
kama labda kuwa na mbili
mambo ya ndani yao.

510
00:21:22,170 --> 00:21:24,810
Moja ni pointer, kwa hakika,
kama nimekuwa kufanya.

511
00:21:24,810 --> 00:21:27,100
Hivyo kila mmoja wa masanduku hayo
si kiini moja tu.

512
00:21:27,100 --> 00:21:29,855
Lakini nini kama juu
one-- chini moja ya

513
00:21:29,855 --> 00:21:32,230
itakuwa null, kwa sababu
hakuna Davenport bado tu.

514
00:21:32,230 --> 00:21:34,197
Nini kama moja ya juu
ni baadhi ya thamani maalum?

515
00:21:34,197 --> 00:21:36,530
Na ni kwenda kuwa kidogo
ngumu kuteka ni ukubwa huu.

516
00:21:36,530 --> 00:21:38,130
Lakini tuseme ni tu alama kuangalia.

517
00:21:38,130 --> 00:21:38,920
Kuangalia.

518
00:21:38,920 --> 00:21:44,230
D-A-V-E-N ni kamba
katika muundo huu data.

519
00:21:44,230 --> 00:21:48,350
>> Wakati huo huo, kama ningekuwa na nafasi zaidi
hapa, mimi naweza kufanya P-O-R-T,

520
00:21:48,350 --> 00:21:52,650
na mimi naweza kuweka hundi katika nodi
ambayo ina barua T mwishoni sana.

521
00:21:52,650 --> 00:21:55,460
Hivyo hii ni massively
tata-kuangalia muundo data.

522
00:21:55,460 --> 00:21:57,210
Na mwandiko wangu
hakika haina msaada.

523
00:21:57,210 --> 00:22:00,043
Lakini kama mimi alitaka kuingiza kitu
mwingine, kufikiria nini tunataka kufanya.

524
00:22:00,043 --> 00:22:03,370
Kama sisi alitaka kuweka Daudi katika,
tunatarajia kufuata mantiki hiyo, D-A-V,

525
00:22:03,370 --> 00:22:08,802
lakini sasa napenda kumweka katika ijayo
kipengele si kutoka E, lakini kutokana na mimi kwa D.

526
00:22:08,802 --> 00:22:10,760
Hivyo kuna kwenda kuwa
nodes zaidi katika mti huu.

527
00:22:10,760 --> 00:22:12,325
Tunakwenda kuwa wito malloc zaidi.

528
00:22:12,325 --> 00:22:14,700
Lakini mimi sitaki kufanya
fujo kamili ya picha hii.

529
00:22:14,700 --> 00:22:17,710
Basi hebu badala kuangalia moja
hiyo imekuwa kabla ya yaliyoandaliwa

530
00:22:17,710 --> 00:22:21,810
kama hii na si dot, dot,
dots, lakini arrays tu kifupi.

531
00:22:21,810 --> 00:22:23,950
Lakini kila mmoja wa nodes
katika hii hapa mti up

532
00:22:23,950 --> 00:22:26,700
inawakilisha thing-- sawa
safu Ray ya ukubwa 26.

533
00:22:26,700 --> 00:22:28,860
>> Au kama tunataka kuwa
kweli sahihi sasa, nini

534
00:22:28,860 --> 00:22:30,790
kama jina la mtu kama
apostrophe, hebu

535
00:22:30,790 --> 00:22:35,560
kudhani kuwa kila nodi kweli ina
kama 27 bahati katika hilo, si tu 26.

536
00:22:35,560 --> 00:22:42,020
Hivyo hii sasa ni kwenda kuwa na data
Muundo aitwaye trie-- T-R-I-E.

537
00:22:42,020 --> 00:22:46,120
trie, ambayo ni eti
kihistoria jina wajanja kwa mti

538
00:22:46,120 --> 00:22:49,040
hiyo ni optimized kwa ajili ya
retrieval, ambayo bila shaka,

539
00:22:49,040 --> 00:22:50,870
yameandikwa na mimi-E hivyo ni trie.

540
00:22:50,870 --> 00:22:52,710
Lakini hiyo ni historia ya trie.

541
00:22:52,710 --> 00:22:55,860
>> Hivyo trie ni hii data mti-kama
Muundo kama mti familia

542
00:22:55,860 --> 00:22:57,510
kwamba hatimaye kutenda kama hiyo.

543
00:22:57,510 --> 00:23:00,890
Na hapa ni mfano mwingine wa
rundo zima la majina ya watu wengine.

544
00:23:00,890 --> 00:23:03,540
Lakini swali sasa
upande ni nini na

545
00:23:03,540 --> 00:23:08,070
sisi kupata kwa kuanzisha arguably zaidi
ngumu data muundo, na moja,

546
00:23:08,070 --> 00:23:09,870
kusema ukweli, ambayo inatumia mengi ya kumbukumbu.

547
00:23:09,870 --> 00:23:11,703
>> Kwa sababu hata ingawa,
kwa wakati huu, mimi nina tu

548
00:23:11,703 --> 00:23:15,050
kutumia D's pointer na
A na V na Es na Ns,

549
00:23:15,050 --> 00:23:16,700
Mimi kupoteza heck ya mengi ya kumbukumbu.

550
00:23:16,700 --> 00:23:18,030

551
00:23:18,030 --> 00:23:22,660
Lakini ambapo mimi kutumia rasilimali moja,
Mimi huwa hawana kupata nyuma ya mwingine.

552
00:23:22,660 --> 00:23:26,020
Hivyo kama mimi nina kutumia nafasi zaidi,
nini pengine matumaini?

553
00:23:26,020 --> 00:23:27,407
Kwamba mimi nina matumizi ya chini ya nini?

554
00:23:27,407 --> 00:23:28,240
Watazamaji: Chini ya muda.

555
00:23:28,240 --> 00:23:28,990
DAVID Malan: Time.

556
00:23:28,990 --> 00:23:30,320
Sasa kwa nini huenda kuwa?

557
00:23:30,320 --> 00:23:33,880
Vizuri, ni nini insertion
muda, katika suala la big O sasa,

558
00:23:33,880 --> 00:23:37,660
jina kama Daven
au Davenport au Daudi?

559
00:23:37,660 --> 00:23:39,340
Naam, Daven ilikuwa hatua tano.

560
00:23:39,340 --> 00:23:42,350
Davenport itakuwa hatua tisa,
hivyo itakuwa hatua chache zaidi.

561
00:23:42,350 --> 00:23:44,250
Daudi itakuwa hatua tano kama vizuri.

562
00:23:44,250 --> 00:23:47,230
Hivyo wale ni halisi
namba, lakini hakika kuna

563
00:23:47,230 --> 00:23:49,550
amefungwa juu juu ya
urefu wa jina la mtu.

564
00:23:49,550 --> 00:23:52,240
Na kwa kweli, katika tatizo
seti ya tano vipimo,

565
00:23:52,240 --> 00:23:54,050
tunakwenda kupendekeza
kwamba ni kitu

566
00:23:54,050 --> 00:23:55,470
hiyo ni wahusika 40-baadhi-isiyo ya kawaida.

567
00:23:55,470 --> 00:23:58,180
>> Realistically, hakuna mtu ana
jina kubwa kwa muda mrefu,

568
00:23:58,180 --> 00:24:01,542
ambayo ni kusema kwamba urefu wa
jina au urefu wa kamba tupate

569
00:24:01,542 --> 00:24:03,750
kuwa baadhi ya hali ya
muundo ni arguably nini?

570
00:24:03,750 --> 00:24:05,550

571
00:24:05,550 --> 00:24:06,250
Ni mara kwa mara.

572
00:24:06,250 --> 00:24:06,430
Haki?

573
00:24:06,430 --> 00:24:09,310
Inaweza kuwa mara kwa mara kubwa kama
40-kitu, lakini ni mara kwa mara.

574
00:24:09,310 --> 00:24:13,752
Na ina hakuna utegemezi juu ya jinsi wengi
majina mengine ni katika muundo huu data.

575
00:24:13,752 --> 00:24:15,460
Kwa maneno mengine, kama mimi
alitaka sasa kuingiza

576
00:24:15,460 --> 00:24:20,540
Colton au Gabriel au Rob au Zamyla au
Alison au Belinda au majina mengine yoyote

577
00:24:20,540 --> 00:24:23,940
kutoka kwa wafanyakazi katika taarifa hii
muundo, ni wakati mbio

578
00:24:23,940 --> 00:24:26,750
ya kuingiza majina mengine
itakuwa wakati wote wanashikiliwa

579
00:24:26,750 --> 00:24:30,220
na mambo mengine jinsi wengi ni
katika muundo data tayari?

580
00:24:30,220 --> 00:24:31,040
Ni si.

581
00:24:31,040 --> 00:24:31,540
Haki?

582
00:24:31,540 --> 00:24:36,150
Sababu sisi ni kutumia kwa ufanisi
hii tabaka mbalimbali hash meza.

583
00:24:36,150 --> 00:24:38,280
Na wakati mbio ya
yoyote ya shughuli hizo

584
00:24:38,280 --> 00:24:41,510
ni tegemezi si juu ya idadi ya
mambo ambayo ni katika muundo data

585
00:24:41,510 --> 00:24:43,090
au kwamba ni hatimaye kwenda
kuwa katika muundo data,

586
00:24:43,090 --> 00:24:44,714
lakini juu ya urefu wa nini hasa?

587
00:24:44,714 --> 00:24:46,500

588
00:24:46,500 --> 00:24:49,200
>> kamba kuwa
kuingizwa, ambayo haina kufanya

589
00:24:49,200 --> 00:24:52,580
hii asymptotically mara kwa mara
time-- kubwa O ya moja.

590
00:24:52,580 --> 00:24:54,720
Na kusema ukweli, tu katika
ulimwengu halisi, hii

591
00:24:54,720 --> 00:24:58,380
ina maana ya kuingiza jina Daven inachukua
kama hatua tano, au Davenport tisa

592
00:24:58,380 --> 00:25:00,100
hatua, au Daudi hatua tano.

593
00:25:00,100 --> 00:25:03,071
Hiyo ni pretty darn mara ndogo mbio.

594
00:25:03,071 --> 00:25:05,320
Na kwa kweli, hiyo ni sana
jambo jema, hasa wakati

595
00:25:05,320 --> 00:25:08,126
si tegemezi kwa jumla
idadi ya vipengele katika huko.

596
00:25:08,126 --> 00:25:10,500
Hivyo ni jinsi inaweza sisi kutekeleza hii
aina ya muundo katika kanuni?

597
00:25:10,500 --> 00:25:12,900
Ni kidogo zaidi
tata, lakini bado ni

598
00:25:12,900 --> 00:25:15,050
tu ya maombi ya
msingi jengo vitalu.

599
00:25:15,050 --> 00:25:17,830
Mimi nina kwenda kutafsiri upya
nasi nodi kama ifuatavyo:

600
00:25:17,830 --> 00:25:21,100
bool aitwaye word-- na hii
inaweza kuitwa chochote.

601
00:25:21,100 --> 00:25:23,970
Lakini bool inawakilisha
nini nilitoa kama alama ya kuangalia.

602
00:25:23,970 --> 00:25:24,490
Ndiyo.

603
00:25:24,490 --> 00:25:26,720
Hii ni mwisho wa kamba
katika muundo huu data.

604
00:25:26,720 --> 00:25:30,702
>> Na, bila shaka, nyota nodi
kuna akimaanisha watoto.

605
00:25:30,702 --> 00:25:32,410
Na kwa kweli, tu kama
mti familia,

606
00:25:32,410 --> 00:25:34,370
kufikiria nodes
kuwa ni kunyongwa mbali

607
00:25:34,370 --> 00:25:36,920
ya chini ya baadhi mzazi
kipengele kuwa watoto.

608
00:25:36,920 --> 00:25:40,510
Na hivyo watoto ni kwenda
kuwa safu ya 27, moja 27

609
00:25:40,510 --> 00:25:41,680
tu kuwa kwa apostrophe.

610
00:25:41,680 --> 00:25:43,390
Tunakwenda aina
ya kesi maalum kwamba.

611
00:25:43,390 --> 00:25:45,400
Hivyo unaweza kuwa na baadhi ya
majina na apostrophes.

612
00:25:45,400 --> 00:25:47,399
Labda hata hyphen lazima
kwenda huko, lakini utasikia

613
00:25:47,399 --> 00:25:50,330
kuona katika p kuweka 5 sisi tu huduma
kuhusu barua na apostrophes.

614
00:25:50,330 --> 00:25:52,990
>> Na kisha jinsi ya kufanya wewe kuwakilisha
data ya muundo yenyewe?

615
00:25:52,990 --> 00:25:56,454
Jinsi gani unaweza kuwakilisha mizizi
ya trie hii, ili kuzungumza?

616
00:25:56,454 --> 00:25:59,620
Naam, tu kama na orodha wanaohusishwa, unaweza
haja pointer kipengele kwanza.

617
00:25:59,620 --> 00:26:04,270
Na trie wewe tu haja moja
pointer mizizi ya trie hii.

618
00:26:04,270 --> 00:26:07,290
Na kutoka huko unaweza hash
njia yako chini zaidi na zaidi

619
00:26:07,290 --> 00:26:10,460
kila nodi nyingine katika muundo.

620
00:26:10,460 --> 00:26:13,440
Hivyo tu na unaweza hii
sisi kuwakilisha kwamba struct.

621
00:26:13,440 --> 00:26:15,877
>> Sasa Meanwhile-- Oh, swali.

622
00:26:15,877 --> 00:26:17,220
>> Watazamaji: Nini bool neno?

623
00:26:17,220 --> 00:26:20,490
>> DAVID Malan: Bool neno ni
tu hii mwili C

624
00:26:20,490 --> 00:26:22,920
ya kile ilivyoelezwa
katika hii sanduku hapa, wakati

625
00:26:22,920 --> 00:26:26,000
Mimi kuanza kugawanyika kila
mambo vipande viwili safu ya.

626
00:26:26,000 --> 00:26:27,600
Moja ni pointer nodi ijayo.

627
00:26:27,600 --> 00:26:30,280
nyingine ina kuwa
kitu kama sanduku hundi

628
00:26:30,280 --> 00:26:33,770
kusema ndiyo, kuna
neno Daven kwamba mwisho hapa,

629
00:26:33,770 --> 00:26:35,610
kwa sababu hatutaki,
kwa wakati huu, Dave.

630
00:26:35,610 --> 00:26:39,320
>> Ingawa Dave ni kwenda kuwa na
neno halali, yeye si katika trie

631
00:26:39,320 --> 00:26:39,830
bado.

632
00:26:39,830 --> 00:26:40,950
Na D ni neno.

633
00:26:40,950 --> 00:26:42,770
Na D-A ni si neno au jina.

634
00:26:42,770 --> 00:26:45,020
Hivyo alama hundi
inaonyesha mara moja tu

635
00:26:45,020 --> 00:26:48,190
kugonga nodi hii ni
njia ya awali ya wahusika

636
00:26:48,190 --> 00:26:50,700
kweli kamba kwamba umefanya kuingizwa.

637
00:26:50,700 --> 00:26:53,660
Hivyo hiyo ni bool wote
kuna ni kufanya kwa ajili yetu.

638
00:26:53,660 --> 00:26:55,500
>> Maswali yoyote nyingine juu ya inajaribu?

639
00:26:55,500 --> 00:26:56,215
Yeah.

640
00:26:56,215 --> 00:26:58,035
>> Watazamaji: ni kuingiliana nini?

641
00:26:58,035 --> 00:26:59,945
Nini kama una Dave na Daven?

642
00:26:59,945 --> 00:27:00,820
DAVID Malan: Perfect.

643
00:27:00,820 --> 00:27:02,580
Nini kama una Dave na Daven?

644
00:27:02,580 --> 00:27:06,240
Hivyo kama sisi kuingiza, wanasema jina la utani,
kwa David-- Dave-- D-A-V-E?

645
00:27:06,240 --> 00:27:07,370

646
00:27:07,370 --> 00:27:08,700
Hii ni kweli super rahisi.

647
00:27:08,700 --> 00:27:10,325
Hivyo sisi ni kwenda tu kuchukua hatua nne.

648
00:27:10,325 --> 00:27:11,042

649
00:27:11,042 --> 00:27:15,847
D-A-V-E. Na nini nina
kufanya mara moja mimi kugonga kwamba nodi ya nne?

650
00:27:15,847 --> 00:27:16,680
Tu kwenda kuangalia.

651
00:27:16,680 --> 00:27:18,000
Tuko tayari vizuri kwenda.

652
00:27:18,000 --> 00:27:18,840
Kufanyika.

653
00:27:18,840 --> 00:27:19,750
Hatua nne.

654
00:27:19,750 --> 00:27:21,590
Wakati mara kwa mara asymptotically.

655
00:27:21,590 --> 00:27:26,300
Na sasa tumekuwa zilionyesha kwamba wote Dave
na Daven ni masharti katika muundo.

656
00:27:26,300 --> 00:27:27,710
Hivyo si tatizo.

657
00:27:27,710 --> 00:27:30,200
Na taarifa jinsi uwepo
ya Daven hakuwa na kufanya hivyo

658
00:27:30,200 --> 00:27:34,750
kuchukua wakati wowote zaidi au chini ya
muda kwa ajili ya Dave na kinyume chake.

659
00:27:34,750 --> 00:27:36,000
>> Hivyo kile kingine tunaweza sasa kufanya?

660
00:27:36,000 --> 00:27:40,680
Tumekuwa alitumia mfano huu kabla
ya trays anayewakilisha kitu.

661
00:27:40,680 --> 00:27:43,380
Lakini zinageuka kuwa
stack ya trays ni kweli

662
00:27:43,380 --> 00:27:47,187
demonstrative ya mwingine data abstract
type-- juu ya muundo data ngazi

663
00:27:47,187 --> 00:27:49,770
kwamba mwishoni siku tu
kama safu au orodha wanaohusishwa

664
00:27:49,770 --> 00:27:50,970
au kitu zaidi mundane.

665
00:27:50,970 --> 00:27:53,270
Lakini ni zaidi ya kuvutia
dhana dhana.

666
00:27:53,270 --> 00:27:56,440
stack, kama haya
trays hapa katika Mather,

667
00:27:56,440 --> 00:27:58,750
ujumla aitwaye
tu that-- stack.

668
00:27:58,750 --> 00:28:02,540
>> Na katika aina hii ya muundo data
una mbili operations--

669
00:28:02,540 --> 00:28:05,880
una mtu mmoja aitwaye kushinikiza kwa
kuongeza kitu kwa stack,

670
00:28:05,880 --> 00:28:08,320
kama kuweka tray mwingine
nyuma juu ya stack.

671
00:28:08,320 --> 00:28:11,350
Na kisha pop, ambayo ina maana
kuchukua topmost tray mbali.

672
00:28:11,350 --> 00:28:16,210
Lakini nini muhimu kuhusu stack ni kwamba
ni got tabia hii curious.

673
00:28:16,210 --> 00:28:19,560
Kama wafanyakazi dining ukumbi ni
rearranging trays kwa ajili ya chakula ijayo,

674
00:28:19,560 --> 00:28:21,380
nini kinaendelea kuwa
kweli kuhusu jinsi wanafunzi

675
00:28:21,380 --> 00:28:22,856
kuingiliana na muundo huu data?

676
00:28:22,856 --> 00:28:24,480
Watazamaji: Wao wanaenda pop mbali moja.

677
00:28:24,480 --> 00:28:26,550
DAVID Malan: Wao wanaenda
pop mbali moja, hopefully juu.

678
00:28:26,550 --> 00:28:28,910
Vinginevyo ni aina tu ya kijinga
kwenda njia yote hadi chini.

679
00:28:28,910 --> 00:28:29,070
Haki?

680
00:28:29,070 --> 00:28:31,620
Muundo data si kweli kuruhusu
wewe kunyakua tray chini angalau

681
00:28:31,620 --> 00:28:32,520
urahisi.

682
00:28:32,520 --> 00:28:35,040
Hivyo kuna hii curious
mali kwa stack

683
00:28:35,040 --> 00:28:39,730
kwamba bidhaa ya mwisho katika ni
itakuwa kwanza moja nje.

684
00:28:39,730 --> 00:28:43,400
Na wanasayansi wa kompyuta kuwaita
hii LIFO-- mwisho katika, kwanza nje.

685
00:28:43,400 --> 00:28:45,540
Na ni kweli haina kuwa
kuvutia maombi.

686
00:28:45,540 --> 00:28:50,090
Ni si lazima kama wazi kama baadhi
wengine, lakini inaweza, kwa kweli, kuwa na manufaa,

687
00:28:50,090 --> 00:28:54,040
na inaweza, kwa kweli, kutekelezwa
katika michache ya njia tofauti.

688
00:28:54,040 --> 00:28:58,550
>> Hivyo moja, na kwa kweli, basi
mimi si kupiga mbizi katika hiyo.

689
00:28:58,550 --> 00:28:59,860
Hebu kufanya hili badala.

690
00:28:59,860 --> 00:29:03,700
Hebu tuangalie moja kwamba karibu
wazo moja, lakini ni ya haki kidogo.

691
00:29:03,700 --> 00:29:04,200
Haki?

692
00:29:04,200 --> 00:29:07,560
Kama wewe ni mmoja wa wavulana hawa mashabiki au
wasichana kwamba kweli anapenda bidhaa Apple

693
00:29:07,560 --> 00:29:10,130
na wewe woke hadi saa 3:00
line up katika baadhi ya kuhifadhi

694
00:29:10,130 --> 00:29:14,150
kupata latest sana iPhone, you
anaweza kuwa foleni juu kama hii.

695
00:29:14,150 --> 00:29:15,800
>> Sasa foleni makusudi sana jina.

696
00:29:15,800 --> 00:29:18,190
Ni mstari kwa sababu kuna
baadhi ya haki yake.

697
00:29:18,190 --> 00:29:18,690
Haki?

698
00:29:18,690 --> 00:29:21,690
Ingekuwa aina ya sucked kama wameweza
got huko kwanza katika Hifadhi Apple

699
00:29:21,690 --> 00:29:25,700
lakini wewe ni ufanisi bottommost
tray kwa sababu wafanyakazi Apple basi

700
00:29:25,700 --> 00:29:28,189
pop mtu wa mwisho ambaye
kweli got katika mstari.

701
00:29:28,189 --> 00:29:31,230
Hivyo mwingi na foleni, ingawa
functionally wao ni aina ya same--

702
00:29:31,230 --> 00:29:33,105
ni tu ukusanyaji hii
rasilimali hiyo ni

703
00:29:33,105 --> 00:29:36,210
kwenda kukua na shrink-- kuna
hili suala haki yake,

704
00:29:36,210 --> 00:29:39,634
angalau katika ulimwengu wa kweli,
ambapo shughuli zoezi

705
00:29:39,634 --> 00:29:40,800
ni tofauti kimsingi.

706
00:29:40,800 --> 00:29:43,360
stack-- foleni
rather-- alisema kuwa

707
00:29:43,360 --> 00:29:45,320
shughuli mbili: n foleni na d foleni.

708
00:29:45,320 --> 00:29:46,341

709
00:29:46,341 --> 00:29:48,090
Au unaweza kuwaita
idadi yoyote ya mambo.

710
00:29:48,090 --> 00:29:50,770
Lakini unataka tu kukamata
dhana kwamba moja ni kuongeza

711
00:29:50,770 --> 00:29:53,230
na moja ni hatimaye subtracting.

712
00:29:53,230 --> 00:29:58,840
>> Sasa chini ya Hood, wote stack
na foleni inaweza kutekelezwa jinsi gani?

713
00:29:58,840 --> 00:30:01,390
Sisi si kwenda katika kanuni za
ni kwa sababu kiwango cha juu

714
00:30:01,390 --> 00:30:03,387
wazo ni aina ya wazi zaidi.

715
00:30:03,387 --> 00:30:04,470
I mean, nini binadamu kufanya do?

716
00:30:04,470 --> 00:30:07,030
Kama mimi nina mtu wa kwanza katika Apple
Kuhifadhi na hii ni mlango wa mbele,

717
00:30:07,030 --> 00:30:08,130
unajua, mimi nina kwenda kusimama hapa.

718
00:30:08,130 --> 00:30:09,750
Na mtu ujao
kwenda kusimama hapa.

719
00:30:09,750 --> 00:30:11,500
Na mtu ujao
kwenda kusimama hapa.

720
00:30:11,500 --> 00:30:13,792
Hivyo kile muundo data
imejikita kwenye foleni?

721
00:30:13,792 --> 00:30:14,542
>> Watazamaji: foleni.

722
00:30:14,542 --> 00:30:15,667
DAVID Malan: Sawa, foleni.

723
00:30:15,667 --> 00:30:16,390
Uhakika.

724
00:30:16,390 --> 00:30:16,920
Nini kingine?

725
00:30:16,920 --> 00:30:17,600
>> Watazamaji: orodha wanaohusishwa.

726
00:30:17,600 --> 00:30:18,990
>> DAVID Malan: wanaohusishwa
orodha unaweza kutekeleza.

727
00:30:18,990 --> 00:30:22,500
Na orodha wanaohusishwa ni nzuri kwa sababu kisha
inaweza kukua kiholela muda mrefu kinyume

728
00:30:22,500 --> 00:30:24,880
kwa kuwa baadhi ya simu za kudumu
ya watu katika kuhifadhi.

729
00:30:24,880 --> 00:30:27,030
Lakini labda idadi fasta
ya maeneo ni halali.

730
00:30:27,030 --> 00:30:30,350
Kwa sababu kama wao tu kama 20
iphone siku ya kwanza, labda

731
00:30:30,350 --> 00:30:33,930
wao tu haja ya safu ya ukubwa
20 kwa kuwakilisha kwamba foleni, ambayo

732
00:30:33,930 --> 00:30:37,070
ni tu kusema sasa mara moja sisi kuanza kuzungumza
kuhusu hizi matatizo ngazi ya juu,

733
00:30:37,070 --> 00:30:38,890
unaweza kutekeleza
katika idadi yoyote ya njia.

734
00:30:38,890 --> 00:30:42,030
Na kuna pengine tu kwenda
kuwa biashara mbali katika nafasi na muda

735
00:30:42,030 --> 00:30:43,950
au tu katika kanuni yako mwenyewe utata.

736
00:30:43,950 --> 00:30:45,380
>> Nini kuhusu stack?

737
00:30:45,380 --> 00:30:48,190
Naam, stack, tumeona pia
inaweza tu kuwa trays haya.

738
00:30:48,190 --> 00:30:50,007
Na unaweza kutekeleza hili safu.

739
00:30:50,007 --> 00:30:53,090
Lakini katika baadhi ya uhakika kama wewe kutumia safu,
nini kitatokea kwa trays

740
00:30:53,090 --> 00:30:54,173
wewe ni kujaribu kuweka chini?

741
00:30:54,173 --> 00:30:55,170

742
00:30:55,170 --> 00:30:55,670
Wote haki.

743
00:30:55,670 --> 00:30:57,490
Wewe kwenda tu kwa
kuwa na uwezo wa kwenda juu mno.

744
00:30:57,490 --> 00:31:00,156
Na nadhani katika Mather wao ni
kweli recessed katika ufunguzi.

745
00:31:00,156 --> 00:31:01,950
Hivyo kweli, ni karibu
kama Mather ni kutumia

746
00:31:01,950 --> 00:31:03,783
safu ya fasta ukubwa,
kwa sababu unaweza tu

747
00:31:03,783 --> 00:31:08,302
fit trays wengi katika ufunguzi katika
ukuta chini chini ya magoti ya watu.

748
00:31:08,302 --> 00:31:10,010
Na hivyo ambayo inaweza kuwa
alisema kuwa safu,

749
00:31:10,010 --> 00:31:14,300
lakini tunaweza shaka kutekeleza kwamba
ujumla zaidi na orodha wanaohusishwa.

750
00:31:14,300 --> 00:31:16,390
>> Naam, nini kuhusu mwingine muundo wa data?

751
00:31:16,390 --> 00:31:18,760
Napenda kuvuta up moja nyingine Visual hapa.

752
00:31:18,760 --> 00:31:24,710
Kitu kama jinsi kuhusu hili moja hapa?

753
00:31:24,710 --> 00:31:28,920
Kwa nini huenda ni kuwa na manufaa kwa kuwa si
kitu kama dhana kama trie, ambayo

754
00:31:28,920 --> 00:31:32,370
tuliona alikuwa haya nodes pana sana,
ambayo kila mmoja ni katika safu?

755
00:31:32,370 --> 00:31:35,740
Lakini nini kama sisi kufanya kitu zaidi
tu, kama zamani mti familia shule,

756
00:31:35,740 --> 00:31:38,110
kila ambaye nodes hapa
ni hifadhi ya idadi tu.

757
00:31:38,110 --> 00:31:42,180
Badala ya jina au ukoo
ni hifadhi ya idadi tu kama hii.

758
00:31:42,180 --> 00:31:45,250
>> Naam, sisi kutumia jargon katika
miundo data ni inajaribu wote

759
00:31:45,250 --> 00:31:49,510
na miti, ambapo trie, tena, ni
mtu ambaye nodes ni arrays tu,

760
00:31:49,510 --> 00:31:51,680
bado nini huenda
kutumia kutoka daraja ya shule

761
00:31:51,680 --> 00:31:53,860
wakati alifanya familia
majani tree-- na mizizi

762
00:31:53,860 --> 00:31:57,250
ya mti na watoto wa
mzazi na ndugu zake.

763
00:31:57,250 --> 00:32:03,670
Na tuweze kutekeleza mti,
kwa mfano, kama tu kama hii.

764
00:32:03,670 --> 00:32:07,420
mti, ikiwa ni kama nodi, moja ya
duru hizi kwamba ina idadi,

765
00:32:07,420 --> 00:32:09,947
si kwenda kuwa na
moja pointer, lakini mbili.

766
00:32:09,947 --> 00:32:11,780
Na haraka kama wewe kuongeza
pointer pili,

767
00:32:11,780 --> 00:32:13,905
unaweza kweli sasa kufanya aina
ya data mbili-dimensional

768
00:32:13,905 --> 00:32:14,780
miundo katika kumbukumbu.

769
00:32:14,780 --> 00:32:16,660
Kiasi kama mbili-dimensional
safu, unaweza

770
00:32:16,660 --> 00:32:18,904
kuwa na aina ya pande mbili
orodha wanaohusishwa lakini wale

771
00:32:18,904 --> 00:32:20,820
kwamba kufuata mfano
ambapo hakuna mizunguko.

772
00:32:20,820 --> 00:32:24,487
Ni kweli mti na moja
grandparent njia ya juu hapa na kisha

773
00:32:24,487 --> 00:32:27,320
baadhi ya wazazi na watoto na
wajukuu na wajukuu kubwa.

774
00:32:27,320 --> 00:32:28,370
na kadhalika.

775
00:32:28,370 --> 00:32:32,390
>> Lakini nini nadhifu kweli kuhusu hili pia,
tu tease wewe kwa kidogo ya kificho,

776
00:32:32,390 --> 00:32:35,370
wanakumbuka recursion kutoka
muda nyuma, ambapo

777
00:32:35,370 --> 00:32:38,220
kuandika kazi kwamba wito yenyewe.

778
00:32:38,220 --> 00:32:41,140
Hii ni fursa nzuri
kutekeleza jambo

779
00:32:41,140 --> 00:32:42,920
kama recursion, kwa sababu kufikiria hili.

780
00:32:42,920 --> 00:32:43,860
>> Hii ni mti.

781
00:32:43,860 --> 00:32:48,040
Na nimekuwa anal kidogo na jinsi
Mimi kuweka integers katika mitaani.

782
00:32:48,040 --> 00:32:51,020
Hivyo kiasi kwamba ina maalum
name-- binary tafuta mti.

783
00:32:51,020 --> 00:32:53,460
Sasa tumekuwa habari ya binary
kutafuta, lakini unaweza

784
00:32:53,460 --> 00:32:55,180
kazi nyuma kutoka jina Kitu huyu?

785
00:32:55,180 --> 00:32:59,280
Ni mfano wa jinsi mimi nini
kuingizwa integers katika mti huu?

786
00:32:59,280 --> 00:33:00,696
Ni si holela.

787
00:33:00,696 --> 00:33:01,570
Kuna baadhi ya muundo.

788
00:33:01,570 --> 00:33:02,090
Yeah.

789
00:33:02,090 --> 00:33:03,370
>> Watazamaji: Ndogo ndio upande wa kushoto.

790
00:33:03,370 --> 00:33:03,690
>> DAVID Malan: Yeah.

791
00:33:03,690 --> 00:33:05,062
Ndogo ndio ni upande wa kushoto.

792
00:33:05,062 --> 00:33:06,270
Kubwa ndio ni juu ya haki.

793
00:33:06,270 --> 00:33:12,940
Kama kwamba kauli ya kweli ni
mzazi ni mkubwa kuliko mtoto wake wa kushoto,

794
00:33:12,940 --> 00:33:14,850
lakini chini ya mtoto wake wa kulia.

795
00:33:14,850 --> 00:33:17,750
Na kwamba peke yake ni hata
kujirudia matusi ufafanuzi

796
00:33:17,750 --> 00:33:20,500
kwa sababu unaweza kuomba kwamba
mantiki hiyo kwa kila node

797
00:33:20,500 --> 00:33:23,080
na tu bottoms
nje, kesi ya msingi kama wewe

798
00:33:23,080 --> 00:33:25,740
mapenzi, wakati hit moja ya
majani, hivyo kusema,

799
00:33:25,740 --> 00:33:28,580
ambapo idhini hana watoto zaidi.

800
00:33:28,580 --> 00:33:30,614
>> Sasa jinsi gani unaweza kupata idadi 44?

801
00:33:30,614 --> 00:33:32,280
Ungependa kuanza saa mizizi na kusema, hm.

802
00:33:32,280 --> 00:33:35,690
55 si 44 Hivyo kufanya mimi nataka kwenda
haki au kufanya mimi nataka kwenda kushoto?

803
00:33:35,690 --> 00:33:37,190
Naam, ni wazi unataka kwenda kushoto.

804
00:33:37,190 --> 00:33:40,060
Na hivyo ni kama simu
kitabu mfano katika kutafuta binary

805
00:33:40,060 --> 00:33:41,099
ujumla zaidi.

806
00:33:41,099 --> 00:33:43,390
Lakini sisi ni kutekeleza hilo
sasa zaidi kidogo dynamically

807
00:33:43,390 --> 00:33:45,339
kuliko safu ili kuruhusu.

808
00:33:45,339 --> 00:33:48,130
Na kwa kweli, kama unataka kuangalia
katika kanuni, katika mtazamo wa kwanza uhakika.

809
00:33:48,130 --> 00:33:49,671
Inaonekana kama rundo zima la mistari.

810
00:33:49,671 --> 00:33:51,220
Lakini ni uzuri rahisi.

811
00:33:51,220 --> 00:33:54,490
Kama unataka kutekeleza kazi
aitwaye search ambao lengo katika maisha

812
00:33:54,490 --> 00:33:57,290
ni kutafuta thamani
kama n, integer,

813
00:33:57,290 --> 00:34:01,756
na wewe ni kupita katika pointer-- moja
pointer nodi ya mizizi,

814
00:34:01,756 --> 00:34:04,380
badala yake, ya mti ambayo
unaweza kupata kila kitu kingine,

815
00:34:04,380 --> 00:34:08,850
taarifa jinsi straightforwardly
unaweza kutekeleza mantiki.

816
00:34:08,850 --> 00:34:10,880
Kama mti ni null,
wazi ni huko.

817
00:34:10,880 --> 00:34:11,880
Hebu tu kurudi uongo.

818
00:34:11,880 --> 00:34:12,000
Haki?

819
00:34:12,000 --> 00:34:14,040
Kama mkono ni kitu,
kuna kitu huko.

820
00:34:14,040 --> 00:34:17,900
>> Mwingine, kama n ni chini ya
mti mshale n-- sasa mshale n,

821
00:34:17,900 --> 00:34:20,670
kukumbuka sisi ilianzisha super
ufupi siku nyingine,

822
00:34:20,670 --> 00:34:25,100
na kwamba tu maana de-rejea
pointer na kuangalia uwanja aitwaye n.

823
00:34:25,100 --> 00:34:27,690
Hivyo ina maana kwenda huko na
kuangalia uwanja aitwaye n.

824
00:34:27,690 --> 00:34:33,810
Hivyo kama n, thamani wewe ni kupewa, ni chini
kuliko thamani katika miti integer,

825
00:34:33,810 --> 00:34:35,449
ambapo unataka kwenda?

826
00:34:35,449 --> 00:34:36,389
Upande wa kushoto.

827
00:34:36,389 --> 00:34:37,780
>> Hivyo taarifa recursion.

828
00:34:37,780 --> 00:34:39,860
Mimi returning-- si kweli.

829
00:34:39,860 --> 00:34:40,989
Si ya uongo.

830
00:34:40,989 --> 00:34:45,670
Mimi kurudi chochote jibu
ni kutoka wito kwa mwenyewe, kupita

831
00:34:45,670 --> 00:34:50,100
n tena, ambayo ni kutokuwa na maana,
lakini nini tofauti kidogo sasa?

832
00:34:50,100 --> 00:34:51,989
Jinsi mimi kufanya tatizo kubwa?

833
00:34:51,989 --> 00:34:54,920
Mimi kupita katika kama wa pili
hoja, si mizizi ya mti,

834
00:34:54,920 --> 00:34:59,616
lakini mtoto wa kushoto katika kesi hii.

835
00:34:59,616 --> 00:35:00,990
Hivyo mimi nina kupita katika mtoto wa kushoto.

836
00:35:00,990 --> 00:35:04,720
>> Wakati huo huo, kama n ni kubwa kuliko
nodi Mimi sasa kuangalia,

837
00:35:04,720 --> 00:35:06,690
Mimi kutafuta upande wa kulia.

838
00:35:06,690 --> 00:35:10,880
Mwingine, kama mti si null, na
kama kipengele si wa kushoto

839
00:35:10,880 --> 00:35:13,240
na si kwa haki,
nini ni ajabu kesi?

840
00:35:13,240 --> 00:35:14,630

841
00:35:14,630 --> 00:35:18,440
Tumekuwa kweli kupatikana nodi katika
swali, na hivyo sisi kurudi kweli.

842
00:35:18,440 --> 00:35:21,490
>> Hivyo tumekuwa tu scratched uso
sasa baadhi ya miundo haya data.

843
00:35:21,490 --> 00:35:24,370
Katika tatizo kuweka tano utasikia
kuchunguza hizi bado zaidi,

844
00:35:24,370 --> 00:35:27,250
na wewe utakuwa kupewa kubuni yako
uchaguzi wa jinsi ya kwenda kuhusu hili.

845
00:35:27,250 --> 00:35:30,250
Nini Ningependa kuhitimisha juu ya
ni tu 30 teaser pili

846
00:35:30,250 --> 00:35:32,080
ya nini watapata wiki ijayo na zaidi.

847
00:35:32,080 --> 00:35:35,390
>> Kama sisi begin-- nashiriki waweza
think-- mpito yetu polepole

848
00:35:35,390 --> 00:35:38,680
kutoka katika ulimwengu wa C na chini
maelezo ya utekelezaji ngazi,

849
00:35:38,680 --> 00:35:42,090
kwa dunia ambayo tunaweza kuchukua kwa
nafasi ya kuwa mtu mwingine ina hatimaye

850
00:35:42,090 --> 00:35:44,010
kutekelezwa data haya
miundo kwa ajili yetu,

851
00:35:44,010 --> 00:35:47,570
na tutaweza kuanza kuelewa
ulimwengu halisi ina maana ya kutekeleza

852
00:35:47,570 --> 00:35:50,560
programu mtandao msingi na
Nje ujumla zaidi

853
00:35:50,560 --> 00:35:52,910
na pia usalama sana
athari kwamba tumekuwa tu

854
00:35:52,910 --> 00:35:54,850
wameanza scratch ya uso wa.

855
00:35:54,850 --> 00:35:57,320
Hapa ni nini watapata sisi
katika siku zijazo.

856
00:35:57,320 --> 00:36:00,480
>> [Video avspelning]

857
00:36:00,480 --> 00:36:03,432

858
00:36:03,432 --> 00:36:12,780
>> Hapo akaja na ujumbe,
na itifaki zake zote wenyewe.

859
00:36:12,780 --> 00:36:26,110

860
00:36:26,110 --> 00:36:30,894
Alikuja ulimwengu wa kikatili
firewalls, asiyejali ruta,

861
00:36:30,894 --> 00:36:33,368
na hatari mbaya zaidi kuliko kifo.

862
00:36:33,368 --> 00:36:35,280

863
00:36:35,280 --> 00:36:36,236
Yeye ni kufunga.

864
00:36:36,236 --> 00:36:37,980
Yeye ni nguvu.

865
00:36:37,980 --> 00:36:42,830
Yeye ni TCP / IP, na yeye got anwani yako.

866
00:36:42,830 --> 00:36:45,290

867
00:36:45,290 --> 00:36:48,074
"Wapiganaji wa Net."

868
00:36:48,074 --> 00:36:49,660
[MWISHO video avspelning]

869
00:36:49,660 --> 00:36:50,910
DAVID Malan: Coming wiki ijayo.

870
00:36:50,910 --> 00:36:51,880
Tutaona wewe basi.

871
00:36:51,880 --> 00:36:54,615

872
00:36:54,615 --> 00:36:56,060
[Video avspelning]

873
00:36:56,060 --> 00:36:59,240
-Na Sasa, "Mawazo Deep"
na Daven Farnham.

874
00:36:59,240 --> 00:37:02,030

875
00:37:02,030 --> 00:37:05,820
-David Daima kuanza
mihadhara na, "haki zote."

876
00:37:05,820 --> 00:37:08,750
Nini, "Hapa ni ufumbuzi
kuweka tatizo wiki hii "

877
00:37:08,750 --> 00:37:12,180
au "Sisi ni kutoa nyote A?"

878
00:37:12,180 --> 00:37:13,380
[Laughing]

879
00:37:13,380 --> 00:37:15,530
[MWISHO video avspelning]