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

Comp 123: Data Structures Y1s2 Question Paper

Comp 123: Data Structures Y1s2 

Course:Bachelor Of Computer Science

Institution: Kabarak University question papers

Exam Year:2008



INSTRUCTIONS:
Answer QUESTION ONE and Any other TWO
QUESTION ONE (30 marks)
(a) Discuss types of data structures [4 marks]
(b) (i)What is an array? [2 marks]
(ii) Discuss the major operations which can be performed in an array [4 marks]
(c) Discuss any two types of memory used in data structures [ 4 marks]
(d) What is a binary tree [ 4 marks]
(e) (i) Describe a stack [2 marks]
(ii) Write algorithm to push an element to the stack [4 marks]
(f) (i)Describe the queue. [2 marks]
(ii)Write steps used to insert an element to the queue [4 marks]
QUESTION TWO (20 marks)
(a) What is a linked stack? Explain with the aid of the diagram its merits [4 marks]
(b) Write algorithm to pop an element from the stack [4 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 [ 4 marks]
QUESTION THREE (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 [6 marks]
(c) Explain the steps used to add a node in a list [4 marks]
(d) Write the algorithm used to delete element from the list [4 marks]
QUESTION FOUR (20 marks)
(a) Discuss double linked stack [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 string? [2 marks]
(ii) Discuss any 4 major functions which can be performed by a string
[ 4 marks]
(e) Discuss briefly about ordered tree [2 marks]
QUESTION FIVE (20 marks)
(a) Discuss about circular queue [2 marks]
(b) Write short on garbage collection and its advantages [6 marks]
(c ) Discuss the use of new and delete in memory allocation [4 marks]
(d) Discuss four advantages of the linked list [4 marks]
(e) Write algorithm to find a node in a binary tree [4 marks]






More Question Papers


Popular Exams


Mid Term Exams

End Term 1 Exams

End Term 3 Exams

Opener Exams

Full Set Exams



Return to Question Papers