The 'magic' trick of pointers to pointers - Professor Brailsford explains how what might seem complicated will actually simplify your code. (See Extra Bits video for a code walkthrough)
The Professor's Code: http://bit.ly/Computerphile_ProfBrails_TripleRef
EXTRA BITS - Triple Ref Code: https://www.youtube.com/watch?v=1s0w_p5HEuY
n.b. Message from the Prof: Many thanks to all of you who have pointed out that I got over excited at the end of this video and (on the LEGO model) did the pointer reassignment in the wrong order. The correct way ( in the model once again) was to do the short pointer first and the longer pointer second - which I think is done correctly in the downloadable C program.
http://www.facebook.com/computerphilehttps://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: http://bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at http://www.bradyharan.com/
400 Comments