6-Algorithms and Data Structures
6-Algorithms and Data Structures
061306T4CPM
COMPUTER PROGRAMMING LEVEL 6
IT/OS/CP/CR/05/6/A
DESIGN ALGORITHMS AND DATA STRUCTURES
NOV/DEC 2023
WRITTEN ASSESSMENT
TIME: 3 Hours
INSTRUCTIONS TO CANDIDATE
Candidates should check the question paper to ascertain that all the pages are printed as
Page 1 of 3
©2023 TVET CDACC
2 3
4 5
Page 2 of 3
©2023 TVET CDACC
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)
Page 3 of 3