# data[].attributes.body
Lab 3 Aug 2016

Refer to page 94:
type Stack.h

Refer to page 110:
Write a program to convert binary to decimal.

# data[].attributes.body
preorder =  1 2 4 5 3 6

inorder = 4 2 5 1 3 6

post order = 4 5 2 6 3 1

secara manual,ia tak check mana yg bsr,mana yg kecil

kalau tak set null,ia akan pergi address
kena set kn null.

# data[].attributes.body
node *root; //guna sekali je
root = new node;
root ->key_value = 1;

node * pnew;
pnew = new node;
pnew -> key_value = 2;
root ->left = pnew;

pnew = new node;
pnew -> key_value = 4;
root->left->left=pnew;

# data[].attributes.body
int multiply (int a,int b)
double multiply (double a, double b)
float multiply (float a,float b)

kalau simplify lagi..

guna template

template <Class T>
T multiply (T a , T b)
{
return a*b;

}

# data[].attributes.body
The math.h header defines various mathematical functions and one macro. All the functions available in this library take double as an argument and returndouble as the result.

# data[].attributes.body
https://gist.github.com/mgechev/5911348

http://www.cprogramming.com/tutorial/lesson18.html

http://math.hws.edu/eck/cs225/s03/binary_trees/

http://cpp.sh/

http://cslibrary.stanford.edu/110/BinaryTrees.html

http://adtinfo.org/libavl.html/BST-Vocabulary.html

Node(T val) { // Constructor
|         this->value = val;
|     }
|

|     Node(T val, Node<T> left, Node<T> right) {
|         this->value = val;
|         this->left = left;
|         this->right = right;
|     }

# data[].attributes.body
A max-heap is a heap where the value of each parent is greater than or equal to the values of its children. Which of the following is a max-heap?

Answer B

# data[].attributes.headline
Tree Question & Tree Question 5 (Answer)

# data[].attributes.subject
Tree Question & Tree Question 5 (Answer)

# data[].attributes.body
My name is Siti Nor Qistina Binti Mohamed Basir
Matric No : B031310214