Dry-run Algorithm

 'Dry-running' an algorithm means to execute its instruction, step-by-step by hand. This is almost always done using a trace table/whiteboard/paper to hold the values of each variable as algorithm proceeds. 

Dry-running is a vital skill for any programmer as it allows you to plan and test algorithms before you write any code. Dry-running can also be really useful for identifying 'difficult-to-find' bugs in your code by taking a suspect portion and meticulously checking exactly what is happening, step-by-step. 

I have dry-run a stair-case problem using whiteboard, please click here to view.





Comments