©2023 TVET CDACC
061306T4CPM
COMPUTER PROGRAMMING LEVEL 6
IT/OS/CP/CR/05/6/A
DESIGN ALGORITHMS AND DATA STRUCTURES
NOV/DEC 2023
TVET CURRICULUM DEVELOPMENT, ASSESSMENT AND CERTIFICATION
COUNCIL (TVET CDACC)
WRITTEN ASSESSMENT
TIME: 3 Hours
INSTRUCTIONS TO CANDIDATE
1. The paper consists of two sections: A and B
2. Answer ALL questions in Section A and any Three from section B
3. Marks for each question are indicated in the brackets
4. A separate answer booklet will be provided
5. Do not write on the question paper
Candidates should answer the questions in English
This paper consists of 3 printed pages
Candidates should check the question paper to ascertain that all the pages are printed as
indicated and that no questions are missing.
Page 1 of 3
©2023 TVET CDACC
SECTION A: (40 Marks)
(Answer ALL the questions in this section)
1. Define the following terms. (4 Marks)
i) Data structure
ii) Recursive function
2. Differentiate between file structure and storage structure. (4 Marks)
3. List THREE main categories of data structures (3 Marks)
4. State TWO reasons why arrays are a fundamental and widely used data structure in
computer programming. (2 Marks)
5. Explain a situation where storing items in an array is clearly better than storing items on a
linked list. (2 Marks)
6. Deduce the pre-order and post-order sequences for the following binary tree. (4 Marks)
2 3
4 5
7. Differentiate between homogeneous and heterogeneous data structures giving an example in
each case. (4 Marks)
8. Explain the meaning of a balanced tree. (2 Marks)
9. Explain the following C# code (2 Marks)
int [] numbers = new int [5];
10. Explain the following operations in relation to queue data structures. (4 Marks)
i) Enqueue
ii) Dequeue
11. List TWO examples of divide and conquer algorithms. (2 Marks)
12. State any FOUR considerations that may influence the choice of an internal sorting
algorithm. (4 Marks)
13. List THREE application areas of data structures. (3 Marks)
Page 2 of 3
©2023 TVET CDACC
SECTION B: (60 Marks)
(Answer any THREE questions in this section)
14.
a. In today’s world, applications are getting more complex and data rich, this has
brought various challenges. Discuss THREE such challenges faced along with how
data structures can help solve them. (9 Marks)
b. Write a C# program that will create a stack of integers named myStack, add integer 42
to the top of the stack and display its contents. (11 Marks)
15.
a. Explain FIVE operations that can be performed in stack data structure. (10 Marks)
b. Given coin denominations [1, 2, 5, 10, 20, 50, 100, 200] and a target amount of 63
cents, find the minimum number of coins needed to make up that amount using
greedy algorithm approach. (10 Marks)
16.
a. Discuss FIVE characteristics of an algorithm. (15 marks)
b. The array below has seven elements. Illustrate searching 34 using the linear search
technique. (5 marks)
17.
a. Linked lists overcome the challenges of using array data structures. Thus, their wide
range of applications. Explain SIX applications of linked lists data structures.
(12 marks)
b. Briefly discuss FOUR basic operations performed in linked list. (8 marks)
THIS IS THE LAST PRINTED PAGE
Page 3 of 3