Search Header Logo
Data Structures_Unit 4(BinTrees, Stack, Q using Linked List)

Data Structures_Unit 4(BinTrees, Stack, Q using Linked List)

Assessment

Presentation

Computers

University

Hard

Created by

Dr.Mydhili Nair

Used 4+ times

FREE Resource

20 Slides • 0 Questions

1

Data Structures_Unit 4(BinTrees, Stack, Q using Linked List)

Conducted By: Dr.Mydhili K Nair, Professor, ISE Dept, RIT

Slide image

2

The array representation for this Binary Tree is:

1) _ D H E C F B A C

2) _ H D E F C B C A

3) A B D _ H C E F

4) A B C D _ E F _ H

Slide image

3

For the Array Representation of the Binary Tree given, which is the left & right child of Index #4 

1) Left: _ Right: _ 
2) Left: _ Right: E
3) Left: E Right: _ 
4) Left: _ Right: 7

Slide image

4

A * B + C * D is an infix expression. Its post-fix equivalent is:

1) * A B * C D +

2) A B + C D * +

3) A B * C D + *

4) A B * C D * +

5

((A+(B-C) * D)^D)^E+F is an infix expression. Its equivalent Postfix expression is:

1) ABC-D*+D^E^F+

2) AB-CD*+D^E^F+

3) ABC-D+*D^E^F+

4) ABC-D*+D^EF^+

6

Pre-Order Traversal for this Binary Tree is:

1) A B D C E G F H I

2) D B G E H I F C A

3) B D A G E C H F I

4) A B C D E F G H I

Slide image

7

Post-Order Traversal for this Binary Tree is:

1) A B C D E F G H I

2) D B G E H I F C A

3) A B D C E G F H I

4) B D A G E C H F I

Slide image

8

In-Order Traversal for this Binary Tree is:

1) A B C D E F G H I

2) D B G E H I F C A

3) B D A G E C H F I

4) A B D C E G F H I

Slide image

9

Pre-Order traversal for this Binary Tree is:

1) 25, 15, 10, 4, 12, 22, 18, 24, 50, 35, 31, 44,70,66, 90

2) 4, 12, 10, 18, 24, 22,15, 31, 44, 35,66, 90, 70, 50,25

3) 4,10,12, 15,18,22, 24,25,31, 35,44,50,66,70,90

4) 25,15,50,10,22,35,70,4,12,18,24,31,44,66,90

Slide image

10

Post-Order traversal for this Binary Tree is:

1) 25, 15, 10, 4, 12, 22, 18, 24, 50, 35, 31, 44,70,66, 90

2) 4, 12, 10, 18, 24, 22,15, 31, 44, 35,66, 90, 70, 50,25

3) 4,10,12, 15,18,22, 24,25,31, 35,44,50,66,70,90

4) 25,15,50,10,22,35,70,4,12,18,24,31,

44,66,90

Slide image

11

In-Order traversal for this Binary Tree is:

1) 25, 15, 10, 4, 12, 22, 18, 24, 50, 35, 31, 44,70,66, 90

2) 4, 12, 10, 18, 24, 22,15, 31, 44, 35,66, 90, 70, 50,25

3) 4,10,12, 15,18,22, 24,25,31, 35,44,50,66,70,90

4) 25,15,50,10,22,35,70,4,12,18,24,31,

44,66,90

Slide image

12

Which function is the following code:

void function(node * root)

{ if (root == NULL) return;

printf("%c", root->data);

function(root-<left);

function(root-<right); }

1) In-Order Traversal

2) Pre-Order Traversal

3) Post-Order Traversal

4) Level-Order Traversal

13

Which function is the following code:

void function(node * root)

{ if (root == NULL) return;

function(root-<left);

printf("%c", root->data);

function(root-<right); }

1) In-Order Traversal

2) Pre-Order Traversal

3) Post-Order Traversal

4) Level-Order Traversal

14

Which function is the following code:

void function(node * root)

{ if (root == NULL) return;

function(root-<left);

function(root-<right);

printf("%c", root->data); }

1) In-Order Traversal

2) Pre-Order Traversal

3) Post-Order Traversal

4) Level-Order Traversal

15

Which of these is the correct deletion operation of a node in a BST, represented by this code?

1) Child node to be deleted has a left child

2) Child node to be deleted has a right child

3) Child node to be deleted has no children


Slide image

16

Which of these is the correct deletion operation of a node in a BST, represented by this code?

1) Child node to be deleted has a left child

2) Child node to be deleted has a right child

3) Child node to be deleted has no children

Slide image

17

Which of these is the correct deletion operation of a node in a BST, represented by this code?

1) Child node to be deleted has a left child

2) Child node to be deleted has a right child

3) Child node to be deleted has no children

Slide image

18

You are a buffet manager. 5 elderly people come late. You will request 5 younger people near the front of the queue to give up their position so the elders can get their lunch first. Which data structure mimics this real-life?

1) Circular Q 2) Linear Q

3) Priority Q 4) Double Ended Q

19

Read the following statement and state which data structure you would use to implement it:  “Suppose we are finding a path for solving maze problem. We choose a path and after following it we realize that it is wrong. Now we need to go back to the beginning of the path to start with new path.”

1) B+ Tree 2) Queue 3) Structure 4) Stack

20

The start date to conduct first internal test, last date to enter into SIS, last date to send proctor reports, start and end date of teaching after the first test, followed by the cycle of events for the second test. Which data structure can mimic this real life scenario?

1)Double Ended Q 2) Linear Q

3) Priority Q 4) Circular Q

Data Structures_Unit 4(BinTrees, Stack, Q using Linked List)

Conducted By: Dr.Mydhili K Nair, Professor, ISE Dept, RIT

Slide image

Show answer

Auto Play

Slide 1 / 20

SLIDE