Construction of a binary tree of a one-dimensional array

Affiliates: 0,07 $how to earn
Pay with:
i agree with "Terms for Customers"
Sold: 3 last one 13.09.2015
Refunds: 0

Uploaded: 29.12.2012
Content: 48,93 kB


The specified one-dimensional array of dimension n.
Required: 1). Sort elements in ascending order, using the method of the bubble.
2). Among the elements of an ordered array to construct a tree by the following rule:
a) the median element is the top of the tree. The array is divided into two parts, the left array from the top and right.
b) elements of the median obtained arrays are the vertices of the next level, which are, respectively, the left and right top of the tree node.
c) an array is divided into four parts. Medial elements of these arrays are respectively next-level nodes of the tree and the left and right upper level node etc. tree is built up until are tried array elements. At the last level of nodes can not be left or right node.
Required to find the left and right nodes of any selected node to construct a function

Additional information


No feedback yet.
In order to counter copyright infringement and property rights, we ask you to immediately inform us at the fact of such violations and to provide us with reliable information confirming your copyrights or rights of ownership. Email must contain your contact information (name, phone number, etc.)