data-structures-work

We were tasked with this work for a school project with the following requirements:

Requirements You are required to write a program in C programming language that has a function named bst_construct(). This function receives two arrays from main() function storing in-order and post-order traversal outputs shown below.

The function then construct a binary search tree (bst) using the in-order and post-order traversal outputs passed to it by main() function. The bst_construct() function then returns address to the root node back to the main() function, the caller function.

Using the address of the root node returned, the main() function traverse the created binary search tree (bst) in breadth-first-search (DFS) traversal while printing each element on standard output device, i.e. computer screen.

Post-order: 5, 15, 10, 25, 45, 30, 20 In-order: 5, 10, 15, 20, 25, 30, 45