Ad Code

cs301 final term papers

click here download final term papers


Today 17/02/2018 CS301 data structure .

50% mcqs in past paper.
Long and short question.
1. Making huffman binary tree using
A,b,c,d,e,f and their frequency is 40,11,33,9,5,20 ( 5 marks ).
2. Making Threaded binary tree using 
40,34,57,70,93,23 traversal order should be Left to right ( 5 marks ).
3. Correct this code ( 5 marks ).
Class A
{
private:
Int c;
Public:
Int& fun ( &int x) const
{
c = x;
Int y =10;
cout y;
return (&x);
}
};
4. ( 5.marks ) Using union operation data are
3,2,4,6,9
And also define working of "-1" word in union operation.
5. ( 5 marks ) Making skip list sketch s0 to s3
Data are 12,34,56,78
6. ( 3 marks ) define the characteristic of skip list
7. ( 3 marks ) tell the frequency of letter given diagram of huffman code.
8.( 3 marks )Define the Union operation of disjoint set.

9. ( 3.marks )By using Huffman coding how to image segmentation.


Attachments:

Attachments:
Attachments:

Assalamualaikum.
CS301 Exam held today:
1.     How one can find the height of a binary tree? (2 marks)
2.     Name any two of "divide and conquer" algorithms. (2 marks)
3.     Why do we use Huffman encoding? (2 marks)
4.     How does heap sort work? (2 marks)
5.     Explain the working of Heap sort. (3 marks)
6.     A function defined with const was given. Output was required. (3 marks)
7.     Insertion sort is used for small lists and quick sort is used for large lists. Why? (3 marks)
8.     Heap tree was given to find either it's Max or Min. The tree data was required to write as an array as well. (3 marks)
9.     Define Collision, Linear Probing, Quadratic Probing. (5 marks)
10.                        Data was given to make an AVL Tree. (5 marks)
11.                        Sets were given to make Union Tree using weight rule. (5 marks)
12.                        Expression tree was given to write Infix expression with parenthesis. (5 marks)
today cs301 paper

Q.No.1.marks 2.
How many rotations will be required to delete a node in AVL tree. If the delete node balance 0 and the node was deleted in the parents.
1) Left sub tree 
2) Right sub tree 
Q.No.2.marks.2
How we can use Disjoint sets for image segmentations.
Q.No.3.marks.2
Give the names of two Divide and Conquer algorithm.
Q.No.4.marks.2
What is the first step of Huffman encoding algorithm.
Q.No.5.marks.3
Create frequency table from “Huffman Encoding”.
Q.No.6.marks.3
Suppose the following function is define in a class named “A”
Intf(inty)const
{
Coutyendl;
Intx;
X=y+10;
Coutx;
}
What is the output of the function when 20 is passed to y???
Q.No.7.marks.3
Construct the tree using union field data structure. Relations are given bellow:
Union(O,A),union(B,M),union(A,G),union(O,N),union(J,H),union(A,C),union(O,B)union(J,O)
Q.No.8.marks.3
Here is an array of integers 
5 3 8 9 1 7 0 2 6 0
Draw this after the first iteration of insertion sort(sorting from smallest to largest)
Q.No.9.marks.5
Show the result of inserting 
2,1,4,5,9,3,6
Into an empty AVL Tree. You have to show only the AVL complete tree, steps are not required.
Q.No.10.marks5
Apply insertion sort algorithm on the following numbers show all steps
77,33,11,88,22,66,55
Q.no.11.5
Suppose we have following representation for a complete binary search tree 

A B C D E F G H I J K L M N O P Q R S T ……….. 
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ..........

What would be the 
a) Left child
b) Right child
c) Parents
d) Of the nodes H and I.
Q.No.12.marks.5
Here is an array with exactly 15 elements 
1,2,3,4,5,6,7,8,9,10.11.12.13.14.15
Suppose we want to find an element using binary search, Indicated that which elements will be found in first two iteration for the following cases
Case 1.The number to be found is 1.
Case 2. The number to be found is 15.
·         Today's paper
mostly mcqs in moaaz fileeee
avl tree sy kafe queston ay thyyyy
what is hashing .... 2m
how we can apply unioun operation on element initially difference sts...2m
describe the case in wich expression tru does not work binary tree......2m
draw AVL treee..... 5m
Why the following figure is not a heap. How can we make it a heap with small changes? 5 marks
check figure in the attachment
·         What is an Equivalent relation? Give any two examples……Answer : (page 387) 3 marks
·         How we can implement Table ADT using Linked? …Answer:- (Page 441) 2 marks
·         "For smaller lists, linear insertion sort performs well, but for larger lists, quick sort is suitable to apply." Justify why?
·         Write usage of Table ADT. 2 marks
·         Remove the smallest element from the following array which represents a min-heap. original min-heap  1  3  2  5  4  8  9  10  7
And show the resultant heap in the form of array as shown below,
·         Write a postfix expression form with equal number of operators and operands
use only +, -, / and * for operators and English letters for operators like A B C.
·         Draw AVL tree ...data were given. 5 marks
·         What is the main level difference b/w two leaf nodes in a heap?
·         One question about merge sort… data was given
·         One question about to draw a heap than ask to write an array (did not remember clearly).
·         One question from BST… data was given in sorted form ask that after forming a BST from the given data what will be the problem in BST and in 2nd part ask to write the solution of the problem and also write that why that solution will be acceptable



Post a Comment

0 Comments

Close Menu