Linear representation of binary tree


Q1. What is the output of the given program? Give reason.

#include
main(){
struct point {
int x, y;
} polygon[]={{1, 2},{1, 4},{2, 4},{2, 2}};
struct point *ptr;
ptr = polygon;
ptr++;
ptr -> x++;
printf(“\n %d”, ptr -> x);
}

Q2. Calculate the time complexity of the given relation:

T(n) = 5*N3 + N2 + 2*N

Q3. Write down the demerits of linear representation of the binary tree.

Q4. Explain different elements of the greedy strategy.

Q5. Define the term Graph and list any three application area of the graph.

Q6. Explain any two Hash functions by using appropriate illustrations.

Q7. Which sorting algorithm is simply adaptable to singly linked lists? Describe your answer.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Linear representation of binary tree
Reference No:- TGS010379

Expected delivery within 24 Hours