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

Datastructures 3

The document outlines the structure and content of the 2021/2022 university examination for the Diploma in Business Information Technology, focusing on Data Structures and Algorithms. It includes various questions on algorithm design, data structures, and programming concepts, requiring students to demonstrate their understanding through pseudo code, definitions, and flowcharts. The exam consists of four main questions, each with sub-questions covering theoretical and practical aspects of the subject.

Uploaded by

natembeatallia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Datastructures 3

The document outlines the structure and content of the 2021/2022 university examination for the Diploma in Business Information Technology, focusing on Data Structures and Algorithms. It includes various questions on algorithm design, data structures, and programming concepts, requiring students to demonstrate their understanding through pseudo code, definitions, and flowcharts. The exam consists of four main questions, each with sub-questions covering theoretical and practical aspects of the subject.

Uploaded by

natembeatallia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIVERSITY EXAMINATIONS: 2021/2022

ORDINARY EXAMINATION FOR THE DIPLOMA IN BUSINESS


INFORMATION TECHNOLOGY AND INFORMATION TECHNOLOGY

DIT 307/DBIT 0305: DATA STRUCTURES AND ALOGORITHMS


FULL TIME/PART TIME

DATE: JULY 2022 TIME: 2 HOURS

INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.

QUESTION ONE:
a) Design an algorithm using pseudo code for a program that calculates the gross pay for a
worker named Charles who worked for 35 hours at Ksh.170 per hour Given that
grossPay=hoursworked * hourlyrate (6 Marks)
b) Differentiate between the following terms:-
(i) Structured walkthrough & dry running (2 Marks)
(ii) Quick sort & selection sorting (2 Marks)
(iii)Static data structures & dynamic data structure (2 Marks)
c) Explain the following terms as used in programming:-
(i) Algorithm (1 mark)
(ii) Data structure (1 mark)
(d) Outline three application areas of queue data structure. (3 Marks)
(e) With the aid of diagrams, describe the queue data structures:- (3 Marks)
(Total: 20 Marks)

Page 1 of 2
QUESTION TWO:
(a) Explain any four features of a good algorithm. (4 Marks)
(b) Discuss the steps of designing an algorithm (5 Marks)
(c) Explain the following terms as used in binary tree data structure:-
(i) Root (2 Marks)
(ii) Path (2 Marks)
(iii)Edges (2 Marks)
(Total: 15 Marks)
QUESTION THREE:
a) A hospital allows its patients to access blood test reports through the Internet. At the time
of visit the system creates a unique user ID and Password which is printed on the
payment receipt. The patient is allowed to log in to the hospitals website on or after the
specified date in payment receipt to access the report.
After logging in to the website, the patient is required to input his/ her email address after
which the system automatically sends the test report to that email address. After sending
the email, the system automatically logs off the patient and displays the message; “Your
report has been sent to your email address”. If the patient tries to log in before the report
receiving date, the system displays the message: “Your report would be available on the
date specified on your payment receipt”.
The user ID and password is valid only for 15 days after the date when the report
becomes available.
Requirement: Draw a flow chart to represent the information in the scenario above.
(8 Marks)
b) Outline three advantages of flowcharts. (3 Marks)
c) Define the term “greedy algorithm” and give two examples of greedy algorithms. (4 Marks)
(Total: 15 Marks)
QUESTION FOUR:
(a) Explain four guidelines for designing algorithms using pseudo code. (4 Marks)
(b) List two parameters that determine the complexity of an algorithm. (2 Marks)
(c) Discuss two techniques for graph traversal. (4 Marks)
(d) Give two data operations supported by array data structure (2 Marks)
(e) Convert the following infix expressions into their equivalent prefix expressions:-
(i) X=A\B*C+D (3 Marks)

Page 2 of 2

You might also like