Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
40 views
4 pages
CamScanner 11-20-2021 12.39
camscanner
Uploaded by
ibraheemyusuf04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save CamScanner 11-20-2021 12.39 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
40 views
4 pages
CamScanner 11-20-2021 12.39
camscanner
Uploaded by
ibraheemyusuf04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save CamScanner 11-20-2021 12.39 For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save CamScanner 11-20-2021 12.39 For Later
You are on page 1
/ 4
Search
Fullscreen
YUSUF MAITAMA SULE UNIVERSITY, KANO © “7 Go S i FACULTY OF SCIENCE a DEPARTMENT OF COMPUTER SCIENCE ; 2018/2019 FIRST SEMESTER EXAMINATION — JUL¥|2019 ©SC2307/ITC2315 — FUNDAMENTALS OF DATA STRUCTURES Instruction: Answer Any Five questions * ‘Time plowed: 3 hours + aY Define a recursive procedure. What are the properties of recursive procedijre? 3 marks ) + b) Write a recursive procedure to find the nth term Fy of a Fibonacci Serias, I mark + ©) What do you understand by an Atray? Mention any four Operations of Anjays? 3 marks 26) }ow is a two-dimensional array represented in the memory? 2 marks ; oe) Consider a 16 x 5 two-dimensional array “marks” which has its basd address = 2632048 | \ “and the width is 4. Caloulats the address ofthe element, marks[12][3}. i, Assuming that the elements are stored in row major order. 1.Smarks | H. Assuming thatthe elements are stored in column major order. 1.Smarks * { A. 4) Corwertthe infix expression X +.(¥ * Z = (L/ M* N) * 0) + P/Q Ad its equivalent Prefix | © expression through Postfix. Show the steps involved and convert it directly to Prefix. — 3marks _b) Consider the prefix expression + ~27 * 8 /~ 4 8 12. Apply an algofithm to evaluate the expression, Hint: Sean Character from right to left one at a time. Ifthe sqanned character is an ‘opetind push it into the Operands Stack and if it is an operator pop twh operands. apply thg oper stor and push back into the stack. Continue until solution is obtained. Smark$ + ©) Corvert each of the following infix expressions into their equivalent postfix expressions: “4 YW OY)" LEKI L) (i) (AP B® O72) * G Gil) A* (B+ D=~E)/A-F (iv) (AB) /(D { i Ss : — = 2 evar ~ 465. pinin the éitvergice betivéen a singly circular linked list and a singly lifked list. 2. marks 48) Write an Algorithm to INSERT a New. Node before 4 given number in a Doubly Linked List : 2marks « 3. a) Draw tree of the below memory representation ‘ Smarks gue : dog an . 2 e % i . rae Bae” E 1 | eo a aN } 7 Oe +b) Write an Algorithm that will DEI-ETE the I 4 ©) Write an algorithm to sort the following ee Simple = {60, 88, 30, 40, 44, 99, 55, 22, 66, last node of a Circular Doubly Linked List 2marks ments of an array i 77, 80, 11,33) — Buyeed ; i . Scanned with CamScannerte between feek(, push() and pop() operations. 2 marks 4) Ditffere sae sagt “4 Consider the STACK felow and use ito find the results ofthe following operations: v ‘ 2 : 67 78 6 0 TT+. 2 Top= 4 3 6 Imark ppush(100) ar) Imark iii, Peek) Imark 4. (a) Give the linked represdptation of the following polynomial: i i (| =. 2marks (b) Every Computer Scientfst *hust grapple with certain classic problems, and the Towers of Hanoi is dne of the most famdhis of these, Legend has it that in a temple in the Far-East, priests are attempting to move a slack of disks from one peg to another. The initial stack had 4 disks threaded onto one peg rd arranged from bottom to top by decreasing size. The priests are attempting to move the stack from this peg to a third peg (as shown in the figure below) under the constraints that exadly one disk is moved at a time, and at no time may a larger disk be i placed above a smalled djsk. A third peg is available for temporarily holding the disks. Supposedly, sonething fd may likely happen to the priest, if they fail to accomplish the task. Write an algorithm to hefp them move all the stack from peg | to3 without a problem, so that they can be safe, Hint: Use Move (Source] Destination, Temp), ie. if you are moving a disk-from 1 to 2 using 3 as temporary, write Movg-(1, 2, 3) or Move (3, 1, 2), if you are moving a disk from 3 to 1 using 2 as temporary. . j : + lst 2nd 3rd 3,4, 5 pho \ = a4,05 6% “ aa ae se I a 4,6245 0 | marks +c) Write an Algorithm that 9 ETE the First node of a Circular Doubly Linked List 2marks | “gy = 4 stack impleihented using a linked list differ from a stack implemented using an array’ rk « €) What do you understand ‘pose overflow and underflow? aime #5, (@) What do you understandby a Queue? Mention 4 types of Queue + 2marks \ ~Ab) How does a Queue reprdsented using an array differ from a Queue represented using a finked : 2 mark: (6) Write an algorithm to INBERT an element in a Circular Queue 2 marks seater ce cea n J ireular queue are waiting for execution and it was decided thet those Feo nes crcranaint'{ 8 2 Josephus Permutation (Josephus Problem), and a promise wee ane ee are eto” il be freed (declared the winner). Ifthe k® person is exeeure first, where k = 3, solve een problem and show all the steps involved until a winner (person to be freed) is declared, dma (©) Write an algorithm to FETE an clement from a Queue implemented using @ linked list. 2 marks Scanned with CamScannerly explain any two types of trees, 2 marks \dy the tree below and write down its traversal results in both Pre-rder and In-order 3 marks ox . pre the corresponding tree of the memory representation below * 3 marks { . (pe one 4 42 ven 2 es ne 4fa 5 6|__19 sire a7 eas [7 8b AVARL gf. TeatimaTION 40 z i 41[_-1 wi 12[_ 7 ver 13 6 * 14|, . -15[0=4 conta =1 i 16 z ee H i 47[_ = aan —4 i is ae 19 =1 20 AND 15 & Scanned with CamScanner\U@) Using the In-onder trapersal r i CFG, construct back the binary tree. 2 marks: (©) Mention any four appligation of tree 2 marks 7. (a) What do you underftand Traversal algorithm? Briefly explain any two 3 marks (0) Write the Huffinan fre¢ of the following characters with their codes table 3 marks +(c) Mention any four (4) Create a Hutfinan’ Character ersal result: DB EA FC G and Pre-ofder traversal result: A B D E ks 2 marks oe with the following nodes arranged ina priority queue, 3 matks 9 +5 4— ni} | a4 | alsa] (©) Cateulate the inten a g ¢ L 4 so 6) atti length and the external path length of the binary tree below. + 3marks Scanned with CamScanner
You might also like
Mic Solved Manual 1
PDF
No ratings yet
Mic Solved Manual 1
29 pages
PYQ Paper 1 (Data Structures Using C++ 2022)
PDF
No ratings yet
PYQ Paper 1 (Data Structures Using C++ 2022)
24 pages
Akth Technical Report
PDF
No ratings yet
Akth Technical Report
20 pages
Dsa Old Question Collection
PDF
No ratings yet
Dsa Old Question Collection
31 pages
PCCS 106
PDF
No ratings yet
PCCS 106
4 pages
Sample Question Paper Data Structure Using 'C'
PDF
No ratings yet
Sample Question Paper Data Structure Using 'C'
5 pages
DS Imp Questions
PDF
No ratings yet
DS Imp Questions
7 pages
DCIT204 Past Questions
PDF
No ratings yet
DCIT204 Past Questions
3 pages
Question Paper Summer 2023
PDF
No ratings yet
Question Paper Summer 2023
4 pages
Jun Jul 2023
PDF
No ratings yet
Jun Jul 2023
3 pages
SPC 2106 Data Structures and Algorithms
PDF
No ratings yet
SPC 2106 Data Structures and Algorithms
3 pages
ITC 2308 HCI Lecture Slides
PDF
No ratings yet
ITC 2308 HCI Lecture Slides
241 pages
QB DS
PDF
No ratings yet
QB DS
6 pages
BCS304 Solved QNP
PDF
No ratings yet
BCS304 Solved QNP
37 pages
Be Computer 3 Sem Data Structures Algorithms p15 Jun 2019
PDF
No ratings yet
Be Computer 3 Sem Data Structures Algorithms p15 Jun 2019
3 pages
Sample Question Paper Data Structure Using 'C' PDF
PDF
No ratings yet
Sample Question Paper Data Structure Using 'C' PDF
5 pages
DS Question Papers (2009 To 2023)
PDF
No ratings yet
DS Question Papers (2009 To 2023)
63 pages
DS 2k23 Btech-Cs-3-Sem-Data-Structure-Kcs-301-2023
PDF
No ratings yet
DS 2k23 Btech-Cs-3-Sem-Data-Structure-Kcs-301-2023
2 pages
Dsa Ie2
PDF
No ratings yet
Dsa Ie2
2 pages
CS2005 Merged
PDF
No ratings yet
CS2005 Merged
15 pages
21CSC201J
PDF
No ratings yet
21CSC201J
2 pages
Dsu QP
PDF
No ratings yet
Dsu QP
28 pages
GSP 2208 Nigerian Government and Economy
PDF
No ratings yet
GSP 2208 Nigerian Government and Economy
59 pages
96154699DC Payment Invoice - YUMSUK
PDF
No ratings yet
96154699DC Payment Invoice - YUMSUK
1 page
Data Structures and Algorithms Question Paper 2015
PDF
No ratings yet
Data Structures and Algorithms Question Paper 2015
4 pages
COMP90038 2022S1 A1 Solutions
PDF
No ratings yet
COMP90038 2022S1 A1 Solutions
4 pages
Advance Class 1 Complete - Protected - Unlocked
PDF
No ratings yet
Advance Class 1 Complete - Protected - Unlocked
55 pages
Data Structure
PDF
No ratings yet
Data Structure
39 pages
Question Bank
PDF
No ratings yet
Question Bank
4 pages
Data Structure
PDF
No ratings yet
Data Structure
4 pages
B.sc. (Hons) Iii Computer Sc. CBCS Data Structures - 2046
PDF
No ratings yet
B.sc. (Hons) Iii Computer Sc. CBCS Data Structures - 2046
4 pages
Ds Pyq
PDF
No ratings yet
Ds Pyq
14 pages
301 Past Questions
PDF
No ratings yet
301 Past Questions
24 pages
Question Bank of Data Structures
PDF
No ratings yet
Question Bank of Data Structures
5 pages
Data Structure
PDF
No ratings yet
Data Structure
39 pages
Fds1 Merged
PDF
No ratings yet
Fds1 Merged
15 pages
SY BCA Data Structure Ques - Bank.
PDF
No ratings yet
SY BCA Data Structure Ques - Bank.
5 pages
22317-2019-Winter-Question-Paper (Msbte Study Resources)
PDF
100% (1)
22317-2019-Winter-Question-Paper (Msbte Study Resources)
4 pages
BCA DS Assignment
PDF
No ratings yet
BCA DS Assignment
4 pages
Cs Sem2
PDF
No ratings yet
Cs Sem2
8 pages
BCA-II - CN121 Introduction To Data Structures - Theory Tutorial
PDF
No ratings yet
BCA-II - CN121 Introduction To Data Structures - Theory Tutorial
6 pages
HCI Sinario Question Answer
PDF
No ratings yet
HCI Sinario Question Answer
3 pages
GSP Lecture Summary-1
PDF
No ratings yet
GSP Lecture Summary-1
3 pages
Itc2301 P2
PDF
No ratings yet
Itc2301 P2
23 pages
DSA Question Paper (1374)
PDF
No ratings yet
DSA Question Paper (1374)
12 pages
DATASTRUCTUREALGORITHMS-2017 3rdsem
PDF
No ratings yet
DATASTRUCTUREALGORITHMS-2017 3rdsem
7 pages
Ict Level 200
PDF
No ratings yet
Ict Level 200
1 page
Data Structure
PDF
No ratings yet
Data Structure
32 pages
DATA STRUCTURES - Lateral Entry
PDF
No ratings yet
DATA STRUCTURES - Lateral Entry
4 pages
DS Previous PPR
PDF
No ratings yet
DS Previous PPR
8 pages
Internet Access
PDF
No ratings yet
Internet Access
6 pages
Past Q
PDF
No ratings yet
Past Q
12 pages
Ds
PDF
No ratings yet
Ds
8 pages
DSA2
PDF
No ratings yet
DSA2
2 pages
2024 Data Structures
PDF
No ratings yet
2024 Data Structures
5 pages
Assignment - 2024 (Data Structure)
PDF
No ratings yet
Assignment - 2024 (Data Structure)
4 pages
21.2 Algo
PDF
No ratings yet
21.2 Algo
4 pages
Ds Tut Sheet
PDF
No ratings yet
Ds Tut Sheet
5 pages
2019 Summer Question Paper (Msbte Study Resources)
PDF
No ratings yet
2019 Summer Question Paper (Msbte Study Resources)
4 pages
Data Structures and Algorithm Analysis 1005
PDF
100% (1)
Data Structures and Algorithm Analysis 1005
22 pages
15CS201J 4 Sem
PDF
No ratings yet
15CS201J 4 Sem
2 pages
CS301 Collection of Old Papers
PDF
100% (2)
CS301 Collection of Old Papers
113 pages
Co 3 Sem 17330 Data Structure Using Cwinter 2018
PDF
No ratings yet
Co 3 Sem 17330 Data Structure Using Cwinter 2018
3 pages
Letter of Invitation
PDF
No ratings yet
Letter of Invitation
1 page
Dsa Ass # 1 Iu
PDF
No ratings yet
Dsa Ass # 1 Iu
5 pages
CS 302 (3001 (O) ) PDF
PDF
No ratings yet
CS 302 (3001 (O) ) PDF
7 pages
CS2201 Data Structure Tutorial
PDF
No ratings yet
CS2201 Data Structure Tutorial
6 pages
Linear Regression
PDF
No ratings yet
Linear Regression
14 pages
Cs205-E S3dec18 Ktuweb
PDF
No ratings yet
Cs205-E S3dec18 Ktuweb
2 pages