Difference between revisions of "CSC231 Final Exam 2015"

From dftwiki3
Jump to: navigation, search
Line 14: Line 14:
 
"Oh, it's this computer program," says Jane, one of your friends. We don't agree on its limits. "Maxim thinks it will run out of memory before it will ever finish, while I think we will run out of time before it finishes!"
 
"Oh, it's this computer program," says Jane, one of your friends. We don't agree on its limits. "Maxim thinks it will run out of memory before it will ever finish, while I think we will run out of time before it finishes!"
  
(Note from DT: "running out of time" here means something that will take much much longer than we are willing to wait for. Running out of time in our case means an execution time of several centuries.)
+
(Note: "running out of time" here means something that will take much much longer than we are willing to wait for. Running out of time in our case means an execution time of several centuries.)
  
 
"What do you mean?" you ask.
 
"What do you mean?" you ask.
  
 
"Well, it's the tower of Hanoi program says Maxim. We have just seen it in class. It's a famous program. In fact it's all over the place on the Web. It's a hugely recursive program, and it generates all the moves you need to follow in order to move all 64 disks from one peg to another peg."
 
"Well, it's the tower of Hanoi program says Maxim. We have just seen it in class. It's a famous program. In fact it's all over the place on the Web. It's a hugely recursive program, and it generates all the moves you need to follow in order to move all 64 disks from one peg to another peg."
 
(Note from DT: feel free to learn more about the towers of Hanoi by exploring the Web at this point!)
 
  
 
"Really" you ask? "What does the code look like?"
 
"Really" you ask? "What does the code look like?"

Revision as of 16:54, 12 December 2015


...