0% found this document useful (0 votes)
669 views4 pages

CSC 207 Past Question PDF

1. The document provides instructions for a fundamentals of data structures exam with 4 questions. Question 1 asks about linear and non-linear data structures, binary tree traversals, and constructing a binary search tree. Question 2 involves lists, arrays, and stack operations. Question 3 covers the importance of data structures and operations on strings and queues. Question 4 defines graph terminology and asks graph problems about adjacency matrices, degrees, loops, sources, and sinks.

Uploaded by

David Gbadamosi
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)
669 views4 pages

CSC 207 Past Question PDF

1. The document provides instructions for a fundamentals of data structures exam with 4 questions. Question 1 asks about linear and non-linear data structures, binary tree traversals, and constructing a binary search tree. Question 2 involves lists, arrays, and stack operations. Question 3 covers the importance of data structures and operations on strings and queues. Question 4 defines graph terminology and asks graph problems about adjacency matrices, degrees, loops, sources, and sinks.

Uploaded by

David Gbadamosi
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/ 4

LADOKE AKINTOLA UNIVERSITY OF TECHNOLOGY,

OGBOMOSHO
FACULTY OF COMPUING AND INFORMATICS
DEPARTMENT OF COMPUTER SCINCE
2020/2021 HARMATTAN SEMESTER EXAMINATIONS

COURSE TITLE: FUNDAMENTALS OF DATA STRUCTURES


COURSE CODE: CSC 207
INSTRUCTION: ATTEMPT ANY THREE QUESTIONS
TIME ALLOWED: I HUR 30 MINS

1. (a) Differentiate between Linear and Non-Linear data structure


(b) Give the Inorder, Preorder, and Postorder traversals of the
following Binary tree.

A) A
B)
A

C
B C
D

D
D

C) D) A
A A
A
B B
D
A A
A
C
D C
A
A A
c. Explain how to construct a Binary Search Tree (BST) for the
following sequence of numbers; 50,70,60,20,90,10,40,100
2. a. The table below is a list of five students and their hostel room
numbers
i). Fill in the values for NSTART and NLINK so that they form
an alphabetical listing of the names.
ii). Fill in the values for RSTART and RLINK so that they form
an ordering of the hostel room numbers

NSTART S/N NAME ROOM NLINK RLINK


1 Bayo 650
2 Sunday 422
3 Ayo 704
RSTART
4 Jamiu 462

5 Busayo 632

(b). Consider the following stack of characters, where STACK is


allocated N = 8memory cells:
STACK: A,C,D,F,K,__,__,__.
(For notational convenience, we use “__” to denote an empty memory
cell) Describe the following operations take place:
i. POP (STACK, ITEM)
ii. POP (STACK, ITEM)
iii. PUSH (STACK, L)
iv. PUSH (STACK, P)
v. POP (STACK, ITEM)
(c). Consider the data in question (b)
i. When will overflow will occur
ii. When will C be deleted before D
3. (a) What are the importance of Data structure in Computer
science?
(b) Given the strings below;
S = ‘A finite sequence of zero characters’
T = ‘The student is ill’
U = ‘teacher’
Evaluate:
i. INSERT (S,27, ‘or more’)
ii. LENGTH (S)
iii. Replace (T, ‘student’,U)
iv. Delete (S,2, 7)
v. Use INSERT to change T so that it reads: ‘The student is
very ill today’
(c) List different types of queue data structures and their
applications
4. (a). Define the following terminologies of a Graph;
(i) Edges (ii) Undirected Graph (iii) Weighted Graph (iv) Path
(b). Give the adjacency matrix of the weighted graph below

1
1 12
3
2

-1 8
4

3
5

5
19
(c) Consider the graph below;

A
B
E

D
F

Find the following :


i. Loop
ii. Indeg(D)
iii. Outdeg(E)
iv. Indeg(F)
v. Outdeg(B)
vi. Sink
vii. Source

FAD-X OF CYB
08083494783

You might also like