Home > Back-end >  Binary tree problem (C/C)
Binary tree problem (C/C)

Time:06-11


5. (15 points). Write a complete program, to enter a positive integer sequence traversal sequence of a binary tree (0 means empty tree), to determine whether the binary tree is binary search tree, if output is True, not False, the output
Input: number N, N binary tree, said the next N lines composed of positive integers and 0 digital
Output: true or false (whether binary search)
Input the sample: 2
14 9 June 11 12 15 0 0 0 0 0 0 0
7, 3, 4, 5 0 0 0 0 0
The output sample: true
false

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related