Review Session Plan for Data Structures Exam: Queues, Stacks, and Link Lists, Exams of Computer Science

A review session plan for the upcoming exam on data structures, focusing on queues, stacks, and link lists. The session includes addressing student questions, providing review problems, and going over the basics of each data structure. Exercises are provided for students to work on in groups, with sample answers and comments included.

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-95y
koofers-user-95y 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Erik Madrid
Marcus Valenzuela
Xomary Rodarte
Miguel Cuellar
2401 PLTL SESSION PLAN, March 26-30.
Overview
For this week's session plan, we have decided that we should conduct a review session for the
next upcoming exam this Thursday and Friday. In order to achieve a good learning session, we
agreed on addressing certain questions students may have from previous session, and then
providing with our own set of review problems to the class (all problems may be answered in a
cooperative learning manner as always). The main topics to review are queues, stacks, and link
lists. Since recursion also plays an important part in some operation for this data structures, we
will also apply them as a previous review for the class. At the end of the session, students should
be ready for the upcoming exam.
Lesson Plan:
Activity Time(mins)
Questions. Anyone? 5 Break
group into groups of 2 or 3 2
Go over basic structure of Link List 5
Review stack characteristics 5
Definition and implementation of queues and circular queue 8
Do exercises 15
Go over exercises as a group 10
Total Time = 50 minutes.
Note. -This plan can vary depending on the participation of the group and the number of students
in the session.
Before starting with the exercises, we believe it is convenient to review all data structure first
and then let them work on the exercises as a group and answering the questions as a class. The
exercises will be the following:
Link List
//Gives the sum of a list recursively
public static int sum (LN l)
{
if (l == null)
return 0;
pf3

Partial preview of the text

Download Review Session Plan for Data Structures Exam: Queues, Stacks, and Link Lists and more Exams Computer Science in PDF only on Docsity!

Erik Madrid Marcus Valenzuela Xomary Rodarte Miguel Cuellar

2401 PLTL SESSION PLAN, March 26-30.

Overview For this week's session plan, we have decided that we should conduct a review session for the next upcoming exam this Thursday and Friday. In order to achieve a good learning session, we agreed on addressing certain questions students may have from previous session, and then providing with our own set of review problems to the class (all problems may be answered in a cooperative learning manner as always). The main topics to review are queues, stacks, and link lists. Since recursion also plays an important part in some operation for this data structures, we will also apply them as a previous review for the class. At the end of the session, students should be ready for the upcoming exam.

Lesson Plan:

Activity Time(mins) Questions. Anyone? 5 Break group into groups of 2 or 3 2 Go over basic structure of Link List 5 Review stack characteristics 5 Definition and implementation of queues and circular queue 8 Do exercises 15 Go over exercises as a group 10

Total Time = 50 minutes.

Note. -This plan can vary depending on the participation of the group and the number of students in the session.

Before starting with the exercises, we believe it is convenient to review all data structure first and then let them work on the exercises as a group and answering the questions as a class. The exercises will be the following:

Link List

//Gives the sum of a list recursively public static int sum (LN l) { if (l == null) return 0;

else return l.value + sum(l.next); }

//Searches for a value in the list recursively public static LN search (LN l, int value) { if (l == null) return null; else if (l.value == value) return l; else return search(l.next, value); }

Note: For the 2 above, please just insert the comments to your copies for the students. I just provided a sample answer for simplicity.

//Trace the following operations on a link list. Include the state of the list at every operation and //the value of the head.

LinkedList list = new LinkedList(); LinkedList list2 = new LinkedList(); insert(list, Node a); insert(list, Node b); insert(list, Node c); remove(list, Node b); find(list2Node c); concatinate(list, list2);

Stacks //Give pseudo-code for any useful implementation of a stack not seen in class.

Queues // What is the difference between a queue and a circular queue?

//Show the state of the queue at every operation. For each, show the top and bottom pointing value of the queue.

Queue q = new Queue(4); enqueue(1); enqueue(2); enqueue(3) ; dequeue();