0% found this document useful (0 votes)
5 views2 pages

GE2

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

L022

COMPUTER SCIENCE GENERAL


Paper: GE/CC-2
(Algorithm and Data Strueture)
Full Marks: 50

The figures in the margin indicate


full marks.
Candidates are required to give thelr answers ln thelr own words
Us Jar a practicable.

Answer Question I and any


no.
four questions from the rest.
1. Answer any five questions from the followi
2/5
(a) Differentiate between Linear and Non-1Linear data structure.
(b) Define a Binary Search Tree.
(c) What are the advantages of Linked List over Array?
(d) What is the postfix expression of the given infix expression (A + B)/ (X - Y) * C?
(e) Differentiate between Linear Queue and Circular Queuc.
(f)What are the advantages of Binary Search over Linear Search?
(g) What do you understand by column major representation of a two-dimensional array?
(h) What do you understand by leaf nodes and internal nodes in a tree?

( a ) Write an algorithm to insert an element at the beginning and end ofsingly linked list.
(b) What are the characteristics of an algorithm? (4+3y-3
3. (a) Define stack.
(b) Write algorithms for the following stack operations, for array implementation of stack :
() Test whether the stack is empty.
(i) Test whether the stack is full.

ii) Push an element to the stack.


iv) Pop an element from the stack.
2+1+1-2-2-2)
(v) Peek the stack.

Please Turn Over


X(2nd Sm.)-Computer Science-G|(GE/CC-2)/CBCS (2)
4 (a) Evaluate the following postfix expression using stack:
8,2, 3, +, -9,3,/,* 4+6
b) Write algorithm for merge sort
tree.
5. (a) Perform pre-order, in-order and post-order traversal of the following binary

to search an element from an array using binary search. (2+2+2)+4


b) Write an algorithm

6. (a) Define BSST.


nodes
BST using the following
-

(b) Construct a

50, 30, 80, 100, 20, 70, 40, 90, 10, 60


Show all the steps in your construction.
in-order traversal of a BST? Does this apply to the BST
(c) What do you observe when you perform
above? 2+5+(1+2)
a 2D-array A is declared using
A (2:8, 1:4). How many elements can you store in A?
7. Suppose
(a) What will be the location of A [S] [6] if you store the elements using row-major order (consider
W = 4)?

(b) Write an algorithm for Insertion sort. (2+3)+5


8. (a) "Binary Search is not possible in linked list"-Justify.
singly linked list?
(b) What are the advantages of doubly linked list over

at end operation on doubly linked list. 3+3+4


(c) Write an algorithm to implement delete

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy