0

The week 0 lecture of CS50 edx. I was not able to understand how did we come to 546 student.

1
  • Go through the lecture again Commented May 14, 2017 at 13:13

1 Answer 1

2

Following would be the steps assuming 8 students are in the room 1. Each of them would have the number 1 in their mind and 8 of them would be standing 2. You add the number in your pair's mind (in this case is 1 in each of their mind and the resultant would be 2) and one of you in your pair sits down. 3. After the pairing, 4 people would be standing with 2 in their mind

This is where the looping starts and you go back to the previous step

  1. As a result of the next step, 2 people would be standing with 4 in their own mind
  2. When they finally pair up, they add their numbers in their mind which would be 4+4=8.
3
  • You dont need to explain everything to him, he can go watch the lecture agin...understand it better and more simply. Commented May 14, 2017 at 13:14
  • @KarthikKirshnan, an example like this is nice to show the other user how it works. Assuming the user watched the lecture and couldn't understand how it worked, it is perfectly fine for Chrystz to provide this example. Commented May 14, 2017 at 14:57
  • @Chrystz Thank you, it is very helpful! Commented May 15, 2017 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .