Placeholder Image

字幕列表 影片播放

  • if a few stress balls left and we could perhaps do this a little dramatically, Maybe with eight volunteers.

  • If you Okay, that's that's a plan.

  • Okay, so one about 23 if we could Okay, four in the middle of their 567 And let's see and lets me come up here.

  • You do it after and have a hand in the middle.

  • About eight volunteered by your friends.

  • Come on up.

  • All right.

  • So come on up, if you would.

  • And, Brian, if we could go ahead and equip our volunteers each with a number, we're gonna go ahead and see if we can't solve together the idea off finding an algorithm for sorting the numbers at hand.

  • So in just a moment, each of you will be handed a number.

  • In the meantime, let's go ahead and just say, a quick introduction, who you are, and perhaps your house cruise.

  • Studly house from Germany.

  • Yeah, Curtis, Just here visiting.

  • Wonderful.

  • All the freshmen.

  • Apt Accord from Turkey for a foe ho from Detroit.

  • Nice.

  • Alison Hollis, cause I'm first year from Cleveland Cloud.

  • I'm in Mauer and I'm from Virginia.

  • I'm roadkill.

  • I mean, Wigglesworth and I'm from Atlanta.

  • I'm your Well, I'm also from Wigglesworth.

  • And I'm from New York.

  • Bonnie, aiming low line from Beijing in Ann Arbor.

  • Wonderful.

  • And I'm noticing now is you might be too.

  • We have nine volunteers on stage, so we're gonna go ahead and solve this.

  • That's okay if you What's your name again?

  • Bonnie.

  • Come on over here.

  • You're gonna be maybe my assistant, if you could, as we sort these elements.

  • Let's go ahead and give you the mike here.

  • Each of you has been handed a number that happens to match with this, which is just so unsorted list of numbers.

  • And let me just ask that are eight volunteers here.

  • Sort yourselves.

  • Go.

  • What are you?

  • I have direct them after this.

  • Excellent.

  • Very well done.

  • Okay, so let me ask any of you and will hand you the mike if need be.

  • What was the algorithm used to sort yourselves human intuition.

  • Okay.

  • Nice.

  • Nice.

  • Other formulations.

  • Yeah, doing.

  • I just checked.

  • If, like the person who's left me like who is supposed to be larger than me is larger than me.

  • And if he was larger than me then I stayed there And if I was larger than him, I just switched places with him.

  • Okay, I like that.

  • A sort of locally optimal approach where you just kind of look to the left and right and sort of fix any transposition, zor mismatches.

  • And in fact, let's go ahead and try and apply that same idea.

  • Can all eight of you, Reese, order yourselves just like that?

  • So that you're standing below your number so that we're undoing the human intuition that we just executed.

  • And now let's go ahead and say, All right.

  • So, bunny, if you don't mind helping direct us there to direct us here, we clearly have now an unsorted list of numbers.

  • Let's just bite off this problem one bit at a time.

  • So, for instance, YouTube your names again.

  • Tress and Curtis.

  • So you guys are clearly out of order.

  • So what would be the locally optimal solution here?

  • They were switched Shorter's OK, Please do that.

  • All right, Now, let's consider six and eight.

  • Uh, they're fine.

  • OK, 85.

  • Let's again please switch again.

  • Eight and two.

  • Such Okay.

  • Eight and 78 and four.

  • Such eight and one.

  • All right.

  • So have we solve the problem, okay?

  • No, obviously not, but is it better?

  • Are we closer to the solution?

  • I mean, I'd argue we are closer because right, like, eight somehow made its way all the way to the correct destination, even though we still have kind of a mess here to fix.

  • But notice that the solution got better in this direction and a little better this direction.

  • But we're going to do this again.

  • So, Bonnie, can you direct us once more?

  • Uh, yeah.

  • So if you would proceed from this order, uh, you two would switch five and 66 and to remain, and then the next person's seven and four horse, which I seven and one inch and then.

  • All right, so now are we done so?

  • No, But look, the problem is getting better.

  • It's closer to solution, because now we have eight in place and seven in place.

  • So we've taken a bite out of the problem, if you would.

  • Now we can do this a little more rapid.

  • So if you want to tell everyone what to do perro eyes pretty quickly.

  • So everyone Human intuition, if you will.

  • But let's do a pair wise.

  • Okay?

  • Sure.

  • Could everyone, if the person on your right is smaller than you, switch with them and then do that again.

  • Good.

  • Do that again.

  • Again.

  • Good.

  • Uh, yeah.

  • On, then.

  • Yeah.

  • So even though we allowed it to get a little organic there at the end Now, is the assorted Yes.

  • So maybe a round of applause for our volunteers here.

  • And thank you, Bonnie, especially.

  • Thank you.

if a few stress balls left and we could perhaps do this a little dramatically, Maybe with eight volunteers.

字幕與單字

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

A2 初級

CS50 2019--閱讀3--分類整理 (CS50 2019 - Lecture 3 - Sorting)

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