Question: Problem 5 [40 points]: Implement in ARM7 assembly language a binary tree for sorting In the main function, open a file to read a sequence
![Problem 5 [40 points]: Implement in ARM7 assembly language a binary](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f38b0a5f7ff_87366f38b09c41be.jpg)
Problem 5 [40 points]: Implement in ARM7 assembly language a binary tree for sorting In the main function, open a file to read a sequence of unsorted integers. For the first input integer, create a root node (12 bytes), holding the integer in the first 4 bytes and two empty pointers, one for the left child node and the other for the right child node. For each of the following input integers, build a node containing the number and insert it to the tree such that for any interior node (holding an integer X) its left branch contains integers smaller than X and its right branch contains integers equal or larger than X. After all integers are inserted, the program would, by traversing the binary tree in an in-order, print out the sorted integers separated by space onto the screen, Specification: you should write Insert as a recursive function. Null or a Pointer to Null or a Pointer to the left child nodethe right child
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
