Binary Tree hdu1710

Source: Internet
Author: User

I have been studying Binary Trees for two days! The path to acm allows me to experience the great efforts I have made. I don't need to talk much about it. Check the code I found on the Internet:

The meaning of this question is very clear. I will show you how to traverse in order, search for In-order, and then search for In-order. But the Code makes me unable to find anything.

Http://acm.hdu.edu.cn/showproblem.php? Pid = 1, 1710

# Include <stdio. h> <. h> build (n, * a, * B, ** p = (n <=) (a [] = * ++ x = p-+-x -, a + x +, B + x +, c +-] = [(~ Scanf (, & a [], B [], c [(I =; I <n; I ++, & (I =; I <n; I ++, & (I =; I <n-; I ++, c [n-

This is a code of the struct pointer!

# Include <stdio. h> <stdlib. h> a [], B [node * lchild, ** m =-> lchild =-> rchild = Creat (I, j, k, t, Tree p) -> data = (m = k; m <= t; m ++ (a [I] = (m = k) p-> lchild = +, I + (m-k), k, m-, (p-> lchild); (m = t) p-> rchild = + (m-k) +, j, m +, t, (p-> rchild); (p! =-> (P-> data! = (Flag =, p-> =, p-> (scanf (, & n )! = (I =; I <= n; I ++, & (I =; I <= n; I ++, & =, n,

 

Maybe you will understand it later!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.