Get premium membership and access revision papers, questions with answers as well as video lessons.

Comp 123: Data Structures Y1s2 2009 Question Paper

Comp 123: Data Structures Y1s2 2009 

Course:Bachelor Of Science In Computer Science

Institution: Kabarak University question papers

Exam Year:2009



COURSE CODE: COMP 123
COURSE TITLE: DATA STRUCTURES
STREAM: Y1S2

INSTRUCTIONS:
Attempt Question ONE and Any other TWO.


QUESTION ONE (30 marks)

(a) Write algorithm to add a node on a binary tree [6 marks]

(b) Write algorithm used to insert an element to the queue [4 marks]

(c) (i) Describe a stack? [2 marks]
(ii) Write algorithm to push an element to the stack [4 marks]

(d) (i) What is an array? [2 marks]
(ii) Discuss the major operations which can be performed in an array [4 marks]

(e) Discuss any two types of memory used in data structures [4 marks]

(f) What is the difference between graph and tree [4 marks]

QUESTION TWO (20 marks)

(a) (i) What is a list? [2 marks]
(ii) Explain with the aid of diagram the linked list [4 marks]

(b) What is doubly linked list explain with the aid of the diagram [4 marks]

(c) Explain the steps used to add a node in a list [4 marks]

(d) Write algorithm to search a node on binary tree [6 marks]


QUESTION THREE (20 marks)

(a) (i) What is a linked stack? [2 marks]
(ii) Explain with the aid of the diagram its merits [4 marks]

(b) Write algorithm delete a node on binary tree [6 marks]

(c) Discuss the steps used to add and delete elements in a queue [4 marks]

(d) What is a circular queue explain with the aid of the diagram [4 marks]

(e) Briefly explain the applications of the queue [2 marks]

QUESTION FOUR (20 marks)

(a) Explain briefly on circular doubly linked list? [2 marks]

(b) Write short notes on garbage collection and its advantages [6 marks]

(c ) Discuss the use of new and delete in memory allocation [4 marks]

(d) Discuss and four advantages of the linked list [4 marks]

(e) Write algorithm to add a node in a binary tree [4 marks]



QUESTION FIVE (20 marks)

(a) Discuss kinds of binary trees [4 marks]

(b) Explain the properties of a binary tree [4 marks]

(c) Explain with the aid of a diagram how you can represent a tree through
linked representation. [4 marks]

(d) (i) What is a graph ? [2 marks]
(ii) Explain the following terms
(a) Directed graph
(b) Undirected graph
(c) Strongly connected graph
(d) Degree of a graph
[4 marks]

(e) Discuss briefly about ordered tree [2 marks]






More Question Papers


Popular Exams



Return to Question Papers