Unit 0 C Review
We will review some aspects of C:
Variable declaration Variables must be declared before they are used.
The general form is <type><identifier>;
Eg: int a;
Can declare, initialize in the same step
Int a = 4;
Every variable has a storage cla

Unit 8 - Tree ADT
A tree is a data structure that is similar to linked lists in the use of nodes and pointers to connect
together. They are used to simulate hierarchical structures, with some value being a root and branches
coming off of it forming their

Unit 3 Stacks
Introduction
In essence, a Stack is simply a List in which all interactions (i.e. insertion, removal, element access) only
occur at the head. They are LIFO (Last In First Out) structures. The last element to be added to the stack
becomes the

Unit 1 General Software Engineering Principles
Introduction
CIS 2520 is a course that aims to look at different representations of data and their uses.
We will look at:
-Lists
-Stacks
-Queues
-Hash Tables
-Recursion
-Trees
-Sorting
Why Software Design?
Th

Unit 2 The List ADT
Introduction
A list is simply a finite sequence of elements of a given type.
Each element has a predecessor (except for the first element of the list i.e. the head)
Each element also has a successor (except of the last element of the l

Unit 4 - Queues
Queues are examples of Lists where insertions can only occur at the tail and deletions can only occur at
the head.
[Reference: http:/brendan.enrick.com/post/Understanding-the-Queue-Data-Structure-Using-a-SimpleC-Implementation]
They operat

Unit 9 - Sorting
A few common sorting algorithms will be looked at in this section:
-Bubble sort
-Insertion Sort
-Quicksort
-Selection sort
-Merge sort
Before they are looked at however, we will define some terms.
A sorting algorithm is said to be adaptiv

Glossary
Unit 1- General Software Engineering Principles
Preconditions Statements that must be true before a function can execute. This places restrictions on
function arguments and the state of the program in general.
Post conditions Statements that must

Unit 5 - Computational Complexity
It becomes important that the algorithms that we write are efficient as well as correct. We will begin to
discuss methods by which to measure the efficiency of algorithms in this section.
Big O
In essence, big O notation

Unit 11 - Search Trees
AVL Trees
AVL Trees are Binary Search Trees that are self balancing. In any scenario after an element is added or
removed there are 2 possible cases to rebalance the tree (4 but the idea holds for the left side as well as
right):
1.

Analysis of Algorithms
4. Algorithm Analysis
Analysis of Algorithms and Data Structures
O() Analysis of Algorithms and Data Structures
Calculate the execution costs for non-
Reasonable vs. Unreasonable Algorithms
recursive algorithms
Using O() Analysis

What is Recursion
3. Recursion
Self referential (defined
in terms of itself)
What is Recursion
What it is good for and what it is not good for
What are the characteristics of recursion
How is a recursive function executed
How is recursive function call im

6. Trees, Heaps, and Binary
Search Trees (BSTs)
Trees
Trees: tree terminology, tree ADT, operations
and efficiency
Make Money Fast!
Binary trees: properties, expression trees
Heaps: heap applications, heap operations
and efficiency, heap as priority qu

Problems of BST
7. AVL Tree and 2-4 Tree
AVL tree and 2-4 tree are balanced search
trees.
AVL tree, the definition, operations for
searching, insertion, deletion, and re-balancing
an AVL tree when it becomes unbalanced, the
efficiency.
2-4 tree, the de

5. Abstract Data Types (ADTs),
Stacks, and Queues
Abstract Data Types (ADTs)
An abstract data type (ADT) is an abstraction of
a data structure.
ADT refers to a way of packaging some
intermediate-level data structures and their
operations into a useful col

Runtime Memory Management:
2. Linked Lists
C review: Run time memory management and
dynamic memory allocation in C.
Linked lists: Structure and operations,
comparison with arrays.
Ordered linked lists and operations.
Doubly linked lists and operations

CIS*2520 Data Structures
Fall 2016
Assignment 4 Guidelines
Assignment 4 is due on Monday morning, Nov 28, 2016.
The assignment should be submitted as a tar file containing the source code as well as a
readme file. There should also be a Makefile to compil

8. Indexes and B-tree
An index
The needs for indexes in applications
like databases.
Simple indexes, dense indexes, sparse
indexes, multi-level indexes.
B-tree for indexing, its definition,
structure, searching, insertion, deletion,
and efficiency.
Indexe

10. Graphs
Graphs: definition, terminology,
properties, and ADT.
Subgraph, tree, forest, spanning tree,
connectivity.
Data structures for graphs.
Traversing: depth first search (DFS)
and breadth first search (BFS).
Finding shortest paths.
graphs
Graphs
SF

9. Hashing
Hashing as a method of indexing.
The components of a hash table.
Hash function, how it works, design of
a hash function.
Collision, what it is, the techniques for
handling collisions, their advantages
and disadvantages.
Hash tables
Hash Tables

Declaration:
int
1. C Review
Storage classes and scopes
Tips for C programming
Review of pointers
Introduction
:
Scope and life time: auto, register, static, extern
type
:
value domain
value
:
current value value domain
name
:
symbolic identifier
locat

CIS*2520 Data Structures
Fall 2016
Assignment 2
(1) (60%) Write a program in which linked lists are used to maintain the data structure for a
car rental company. The program allows several types of transactions to be applied to the data
structure in order

CIS*2520 Data Structures
Fall 2016
Assignment 4
Write a C program to implement the AVL tree paradigm. Your AVL tree implementation
should deal with nodes, each of which has a key and a count. The key is a character string,
whereas the count is an integer

CIS*2520 Data Structures
Fall 2016
Assignment 3
(1) (50%) Write a C program that takes as input a fully parenthesized, arithmetic expression
of binary operators +, , , /, and converts the expression into a binary expression tree. Your
program shall allow

CIS*2520 Data Structures
Fall 2016
Assignment 1 Guidelines
Assignment 1 is due on Monday September 26, 2016.
You can develop your programs using any C system, as long as your programs can be
correctly executed on the Linux system in SOCS.
You are allowed

CIS*2520 Data Structures
Fall 2014
Assignment 3 Guidelines
Assignment 3 is due on Monday morning, Nov 7, 2016.
Write a makefile that can be used to generate two executables, same as the one for Assignment 2. The information in readme file is the same as b

CIS*2520 Data Structures
Fall 2016
Assignment 2 Guideline
Assignment 2 is due on Monday October 17, 2016.
Create two C files for the two questions respectively, for example, q1.c and q2.c. Create a
makefile for compiling the programs. The makefile should

CIS*2520 Data Structures
Fall 2016
Assignment 1
(1) (30%) Write a C program that outputs all possible strings, each of which is formed by using
the characters c, a, r, b, o, and n exactly once. Such strings include carbon, carbno,
carobn, ., nobrac.
(2) (