SlideShare a Scribd company logo
1 of 28
How to Find PRI-ORDER, IN-ORDER, POST-ORDER
Traversal in TREE.
• As we all know there are certain rules (or manner) that we have to follow for Traversal
in tree.
• Pri-Order :- Root, Left, Right.
• In-Order :-Left, Root, Right.
• Post-Order :-Left, Right, Root .
• Sometimes it’s confusing that what manner we have to follow for PRI-Oder, IN-Order,
POSTER-Order Traversal.
• So now we see how to do In-order, Pri-order and Post-order traversal in different
manner.
Left, Right, Bottom side of NODE.
50Left-hand side of Node Right-hand side of Node
Bottom side of Node
For PRI-ORDER TRAVERSAL.
IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU
HAVE TO WRITE THAT VALUE IN OUTPUT.
50
Pri-Order:-
50
• IF YOU ARE IN BOTTOM OF THE NODE THEN YOU DON’T
HAVE TO WRITE ANYTHING IN OUTPUT.
50
Pri-Order:- NULL
PRI-ORDER TRAVERSAL
• IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN
ALSO YOU DON’T HAVE TO WRITE ANTHING IN OUTPUT.
50
Pri-Order:- NULL
PRI-ORDER TRAVERSAL
Now see how to follow this steps in TREE Traversal.
50
35
20 45 7060
80
Example.
Draw one imaginary path around given TREE
Step 1:
35
20 45 9060
80
5050
PRI-ORDER:- .
20
35
45
80
60 90
IF YOU ARE IN LEFT HAND
SIDE OF NODE THEN YOU
HAVE TO WRITE THAT VALUE
IN OUTPUT
For IN-ORDER TRAVERSAL.
IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU
DON’T HAVE TO WRITE ANYTHING IN OUTPUT.
50
IN-Order:-NULL
50
• IF YOU ARE IN BOTTOM OF THE NODE THEN YOU HAVE
TO WRITE THAT VALUE IN OUTPUT.
50
IN-Order:-
50
IN-ORDER TRAVERSAL
• IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN
YOU DON’T HAVE TO WRITE ANYTHING IN OUTPUT.
50
IN-Order:- NULL
IN-ORDER TRAVERSAL
50
35
20 45 7060
80
Example.
Draw one imaginary path around given TREE
Step 1:
50
35
20 45 9060
80
Let’s see one example.
IF YOU ARE IN BOTTOM
SIDE OF NODE THEN YOU
HAVE TO WRITE THAT
VALUE IN OUTPUT
20
IN-ORDER:- .
35
45
50
60
80
90
For POST-ORDER TRAVERSAL.
IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU
DON’T HAVE TO WRITE THAT VALUE IN OUTPUT.
50
POST-Order:-NULL
50
• IF YOU ARE IN BOTTOM OF THE NODE THEN YOU DON’T
HAVE TO WRITE ANYTING IN OUTPUT.
50
POST-Order:-NULL
POST-ORDER TRAVERSAL
• IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN
YOU HAVE TO WRITE THAT VALUE IN OUTPUT.
50
POST-Order:-
50
POST-ORDER TRAVERSAL
50
35
20 45 7060
80
Example.
Draw one imaginary path around given TREE
Step 1:
50
35
20 45 9060
80
Let’s see one example.
Post-Order:- .
20
IF YOU ARE IN RIGHT-
HAND SIDE OF NODE
THEN YOU HAVE TO
WRITE THAT VALUE
IN OUTPUT
45
35
60 90
80
50
Conclusion
• PRI-ORDER :- Consider the value If you are in LEFT-HAND SIDE
of the NODE.
• IN-ORDER :- Consider the value if you are in BOTTOM SIDE
of the NODE
• POST-ORDER:- Consider the value If you are in RIGHT-HAND SIDE
of the NODE.
50
50
50
• Still if you have any queries then ask them on.
Email:-Upadhyayraj007@gmail.com

More Related Content

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 

Recently uploaded (20)

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Tree Traversals (In-order, Pre-order and Post-order)

  • 1.
  • 2. How to Find PRI-ORDER, IN-ORDER, POST-ORDER Traversal in TREE. • As we all know there are certain rules (or manner) that we have to follow for Traversal in tree. • Pri-Order :- Root, Left, Right. • In-Order :-Left, Root, Right. • Post-Order :-Left, Right, Root . • Sometimes it’s confusing that what manner we have to follow for PRI-Oder, IN-Order, POSTER-Order Traversal. • So now we see how to do In-order, Pri-order and Post-order traversal in different manner.
  • 3.
  • 4. Left, Right, Bottom side of NODE. 50Left-hand side of Node Right-hand side of Node Bottom side of Node
  • 5.
  • 6. For PRI-ORDER TRAVERSAL. IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT. 50 Pri-Order:- 50
  • 7. • IF YOU ARE IN BOTTOM OF THE NODE THEN YOU DON’T HAVE TO WRITE ANYTHING IN OUTPUT. 50 Pri-Order:- NULL PRI-ORDER TRAVERSAL
  • 8. • IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN ALSO YOU DON’T HAVE TO WRITE ANTHING IN OUTPUT. 50 Pri-Order:- NULL PRI-ORDER TRAVERSAL
  • 9. Now see how to follow this steps in TREE Traversal.
  • 11. Draw one imaginary path around given TREE Step 1:
  • 12. 35 20 45 9060 80 5050 PRI-ORDER:- . 20 35 45 80 60 90 IF YOU ARE IN LEFT HAND SIDE OF NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT
  • 13.
  • 14. For IN-ORDER TRAVERSAL. IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU DON’T HAVE TO WRITE ANYTHING IN OUTPUT. 50 IN-Order:-NULL 50
  • 15. • IF YOU ARE IN BOTTOM OF THE NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT. 50 IN-Order:- 50 IN-ORDER TRAVERSAL
  • 16. • IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN YOU DON’T HAVE TO WRITE ANYTHING IN OUTPUT. 50 IN-Order:- NULL IN-ORDER TRAVERSAL
  • 18. Draw one imaginary path around given TREE Step 1:
  • 19. 50 35 20 45 9060 80 Let’s see one example. IF YOU ARE IN BOTTOM SIDE OF NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT 20 IN-ORDER:- . 35 45 50 60 80 90
  • 20.
  • 21. For POST-ORDER TRAVERSAL. IF YOU ARE IN LEFT-HAND SIDE OF NODE THEN YOU DON’T HAVE TO WRITE THAT VALUE IN OUTPUT. 50 POST-Order:-NULL 50
  • 22. • IF YOU ARE IN BOTTOM OF THE NODE THEN YOU DON’T HAVE TO WRITE ANYTING IN OUTPUT. 50 POST-Order:-NULL POST-ORDER TRAVERSAL
  • 23. • IF YOU ARE IN RIGHT-HAND SIDE OF THE NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT. 50 POST-Order:- 50 POST-ORDER TRAVERSAL
  • 25. Draw one imaginary path around given TREE Step 1:
  • 26. 50 35 20 45 9060 80 Let’s see one example. Post-Order:- . 20 IF YOU ARE IN RIGHT- HAND SIDE OF NODE THEN YOU HAVE TO WRITE THAT VALUE IN OUTPUT 45 35 60 90 80 50
  • 27. Conclusion • PRI-ORDER :- Consider the value If you are in LEFT-HAND SIDE of the NODE. • IN-ORDER :- Consider the value if you are in BOTTOM SIDE of the NODE • POST-ORDER:- Consider the value If you are in RIGHT-HAND SIDE of the NODE. 50 50 50
  • 28. • Still if you have any queries then ask them on. Email:-Upadhyayraj007@gmail.com