Change a tree so that the roles of the left and right pointers are swapped at every node
Interview PuzzlesGDI+Ado.Net TutorialAsp.Net TutorialLectures videosWinform TutorialC#.Net TutorialProgramming Tips And TricksVisual C++ TutorialAdo.net TutorialActiveX Controls TutorialATL COM TutorialCOM TutorialManaged C++The Buddha And His DhammaBea WebLogic InterviewsTCL Programming FAQ'sComputer Science NotesDiscrete Mathematics notesDatabase Management System(DBMS) FaqsProfessional Practices FaqsLotus Notes FaqsBeautiful advertisementsProgramming interview Questions and answers Blog ListHuman Resource TipsTips for Windows XP SystemsTips for Internet and Computer usersTips for better e-mail etiquetteJavaScript Faq'sVB Script FAQ'sHTML Faq'sPerl Scripting FAQ'sWinrunner Faq'sLinux FAQ'sCCNA cisco CertificationData WareHousing InterviewMicrosoft SharePoint InterviewC++ InterviewSiebel Customer Relationship Management FAQ'sC Programming Language- Step by step learningUnix FAQ'sSample Source Code for all languagesVarious Technical and academic certifications
Source Code
Certifications
Misceleneous technical Faq's
VC++ Blog
Data structures Blog
.Net Blog
C#.Net Blog
VB.Net Blog
ASP.Net Blog
ADO.Net Blog
Winform Blog
WCF / WPF Blog
Job Openings
Operating Systems Faqs
Sybase Faq's
Download free e-books
All scripting Faq's
Oracle Faq's
All technical Faq's
Hasya-Vyang hindi kavite
HR, Car, Finance Faq's
Finance and Investment Faq's
All Freshers Resources
All Placement Papers
QA and testing Faq's
Sql Server Faq's
Mainframes Faq's
Java Faq's
Sap Faq's
Jokes & Fun
Click here to enter your page's footer (optional).
/*Change a tree so that the roles of theleft and right pointers are swapped at every node.So the tree... */void mirror(struct node* node) {
if (node==NULL) { return; } else {
struct node* temp;
// do the subtrees mirror(node->left); mirror(node->right);
// swap the pointers in this node temp = node->left; node->left = node->right; node->right = temp; }}