Description
Department of Computer Science and Engineering
Course Code:CSE220 Credits:1.5
Course Name: Data Structure Semester: Fall’18
Lab 03 Circular Array
I. Topic Overview:
Students will be able to create a circular array practically. They will have hands-on practice over the basic operations on circular array including array traversal, resize, shifting, linearizing the circular form of array etc. Some practical use of circular array will also be covered.
II. Lesson Fit:
The lab itself should be followed by the previous lab and theory knowledge on the array data structure as well as the circular nature of array. Moreover, students need to be familiar with basic programming in Java and IDE (Dr. Java)
III. Learning Outcome:
After this lecture, the students will be able to:
a. Use circular characteristics of the array.
b. Understand an important application of the modulo operator.
c. Practice real-life application with checking palindrome.
IV. Anticipated Challenges and Possible Solutions
Solutions:
i. Use index = index % array.length
ii. If(index == array.length) index = index –array.length
Solutions:
i. Same as a
Solutions:
i. Use index = index % array.length
ii. If(index < 0) index = array.length-1
d.
e. Task 7: Students think that the first input is always larger Solutions:
i. Check both numbers in order to find the larger value
V. Acceptance and Evaluation
Students will be evaluated according to their progress in the lab as they complete each problem. Maybesome of the students will not be able to finish all the 14tasks; they will submit them later and give anoral justification to get their performance mark.
VI. Activity Detail
a. Hour: 1
Discussion:
1. A short quiz on the previous lab topic.
2. Evaluating and discussing the quiz question.
Problem Task:
i. Quiz question will be prepared by the lab faculty members
b. Hour: 2
Discussion:
A quick review of the previous lab and recap the theory and basic structure of circular array that is already demonstrated in the classroom.
Problem Task:
i. Task 1 to 8 (Page 4)
c. Hour: 3
Discussion:
Check task 1 to 8 while the students continue with the rest.
Problem Task:
i. Task 9 to 14(Page 4 to 5)
VII. Home tasks
a. Unfinished tasks
Lab 1 Activity List
Task 1
Build a circular array and print them in forward and backward order. Also,print the linear status of the array.
Task 2
Convert the circular array into liner array.
Task 3
Resize the circular array without changing the start pointer.
Task 4
Resize the circular array after linearizing the circular array.
Task 5
Insert into a circular array with a right shift.
Task 6
Insert into a circular array with a left shift.
Task 7
Remove from circular array considering left shift
Task 8
Remove from circular array considering a right shift
Task 9& Task 10
Check if the array consists of palindrome matching.
Task 11
Sort the circular array.
Task 12&Task 13&Task 14
Check equivalence of circular array considering different test cases.
Reviews
There are no reviews yet.