node * reverse(node * root){ node *t1 = root, *t2 = 0, *p = 0; if(root) { t2 = root -> next; t1 -> next = 0; } while(t2){ p = t2 -> next; t2 -> next = t1; t1 = t2; t2 = p; } return t1;}
This will terminate even if the list is a loop. “Shall we write some code?” and I remember thinking in my mind that this will be the easy part.
He had already done this with his statement that lack of knowledge of what Quality is constitutes incompetence. It's an old rule of logic that the competence of a speaker has no relevance to the truth of what he says, and so talk of incompetence was pure sand. Robert M. Pirsig Zen and the Art of Motorcycle Maintenance
Remember Me
a@href@title, strike
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Roshan James
E-mail