Placeholder Image

字幕列表 影片播放

  • You'll recall from week zero that one of the first problems we solved

  • was looking up someone in a phone book.

  • Well, here I have a pretty thick yellow pages wherein

  • there's a whole bunch of products and services alphabetized from A to Z.

  • And we can, of course, look up the number for someone in this book.

  • For instance, suppose today we need a plumber.

  • Could we ask Mariano to find us a plumber in this phone book?

  • Flipping through a few pages.

  • A lot of pages.

  • Yeah.

  • OK.

  • All right.

  • And we have a page full of plumbers.

  • And now, could your dad have done better do you think?

  • DANIELLA: Yes.

  • DAVID MALAN: I think so.

  • So would you like to show dad and other parents here

  • what you might have done instead?

  • Oh my goodness.

  • [LAUGHTER]

  • OK.

  • Thank you.

  • [APPLAUSE]

  • [LAUGHTER]

  • DAVID MALAN: And for those wondering, let's continue the algorithm,

  • if you will.

  • What's your next step?

  • [LAUGHTER]

  • Nice.

  • And why are you doing this, though?

  • DANIELLA: So I open halfway and then if it's not on the page

  • and it looks like, for example, if it's n, I know p is afterwards.

  • So I need to get rid of the first half and just look at the second half.

  • DAVID MALAN: Well, need to is a little strong.

  • [LAUGHTER]

  • But you can get rid of--

  • yes, indeed.

  • So if you keep this process going, halving, and halving, and halving,

  • what should you be left with ultimately?

  • DANIELLA: Just the letter p.

  • DAVID MALAN: Just the letter p.

  • Round of applause would be good for both of our volunteers here.

  • [APPLAUSE]

  • DAVID MALAN: Thank you.

You'll recall from week zero that one of the first problems we solved

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

CS50 2019--閱讀8--電話本 (CS50 2019 - Lecture 8 - Phone Book)

  • 3 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字