Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize Post-order traversal in C language

Shulou Source: shulou.com Published: 2022-06-01 01:43:29 10月25日 Update

This article mainly introduces "how C language realizes post-order traversal". In daily operation, I believe that many people have doubts about how C language realizes post-order traversal. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubt of "how to realize post-order traversal in C language"! Next, please follow the editor to study!

Implementation of subsequent traversal:

Achieve results:

Topic and analysis

The preorder traversal and intermediate order traversal of a given tree are given to find the subsequent traversal.

Input

Abdec

Dbeac

Output

Debca

3. Implementation code:

# include # include using namespace std;string S1 = "abdec"; / / preorder traversal of string S2 = "dbeac"; / / traversal of void calc in the middle order {int m=s2.find (S1 [L1]) {int m=s2.find (S1 [L1])

Tags: Language learning more help practical next code effects articles methods theories knowledge articles websites materials follow questions topics ease of use analysis Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno MariaDB Xiaomi Shulou Information