Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

PREFACE

These Student Activity Sheets (SAS) for the 1st Semester A.Y. 2022 – 2023
version of the Bachelor of Science in Information Technology CC214/CC214 L Data
Structures and Algorithms has been carefully crafted to supplement your learning
experience and provide you with hands-on practice in implementing and applying key
concepts in data structures and algorithms using the Python programming language. As
this is a work in progress, it will be updated frequently over the course of the semester.
Data structures and algorithms are at the core of computer science and software
development. They provide the essential tools and techniques for organizing,
manipulating, and processing data efficiently. In this course, we will explore various data
structures such as arrays, linked lists, stacks, queues, trees, and graphs, as well as
algorithms for searching, sorting, and graph traversal.

The activity sheets are organized in a progressive manner, starting from basic
concepts and gradually advancing to more complex topics. Each sheet includes a clear
explanation of the concept being covered, followed by a set of exercises and
programming challenges. The exercises range from theoretical questions to practical
coding tasks, allowing you to test your understanding and practice implementing the
concepts in Python.

Throughout the activity sheets, you will find examples and illustrations to help
you grasp the concepts more effectively. We encourage you to actively engage with the
material, work through the Guided Practice and CompuSkills independently, and seek
assistance when needed. The provided solutions and explanations will serve as a
reference and learning aid, helping you to validate your solutions and gain insights into
alternative approaches.

By working through these activity sheets, you will develop a strong foundation in
data structures and algorithms, gain proficiency in implementing them using Python,
and sharpen your problem-solving skills. These skills are not only essential for
academic success but also highly valued in the industry, as they form the basis for
building efficient and scalable software systems.

ii
We hope that you find these Student Activity Sheets in Data Structures and
Algorithms in Python valuable and enjoy the learning journey ahead. By utilizing this
course pack, BSIT students will have access to a valuable tool that can significantly
contribute to their success in Data Structures and Algorithm. It is our firm belief that this
resource will empower students to deepen their understanding, overcome hurdles, and
excel in this subject area. We have endeavored to provide a rich learning experience
that not only aids in comprehending complex concepts but also encourages critical
thinking and problem-solving skills. Remember, practice is key to mastery, so embrace
the challenges, embrace the code, and embrace the world of data structures and
algorithms in Python!

MELANIE R. ALBARRACIN , MCS


Instructor

iii
COLLEGE OF TECHNOLOGY AND ENGINEERING
Information Technology Department

August 18, 2022

THE INSTRUCTIONAL MATERIALS COMMITTEE


This University
Lamacan, Argao, Cebu

Dear Sir:

I am writing to formally request the adoption of the Student Activity Sheets for Data
Structures and Algorithms as an official course pack for the Bachelor of Science in
Information Technology (BSIT) program.

Having carefully reviewed the content and structure of the Student Activity Sheets, I
strongly believe that they are a valuable educational resource that can greatly enhance
the learning experience of BSIT students in the field of Data Structures and Algorithms.
The course pack provides comprehensive coverage of essential concepts, practical
implementation guidance, and problem-solving exercises, making it an ideal supplement
to the existing curriculum.

Here are some key reasons why I recommend adopting the Student Activity Sheets for
Data Structures and Algorithms as a course pack:

1. Enhanced Clarity and Presentation: The Student Activity Sheets have been
meticulously designed to improve the clarity and presentation of instructional
materials. The content is organized in a progressive manner, starting from
fundamental concepts and gradually progressing to more advanced topics. This
approach ensures that students can grasp the material effectively and build a
strong foundation in Data Structures and Algorithms.

2. Practical Implementation Guidance: The inclusion of practical implementation


guidance in the Student Activity Sheets allows students to apply theoretical
concepts to real-world scenarios. By actively writing code and solving coding
challenges, students can develop their programming skills and reinforce their
understanding of the underlying concepts.

3. Active Learning Opportunities: The activity-based approach in the Student


Activity Sheets promotes active learning and engagement among students. The
exercises and programming tasks encourage students to think critically, analyze
problems, and develop effective solutions. This hands-on approach fosters a

iv
deeper understanding of Data Structures and Algorithms and enhances problem-
solving abilities.

4. Accessibility and Availability: By adopting the Student Activity Sheets as a course


pack, students will have access to a comprehensive and accessible resource that
caters specifically to the needs of the BSIT program. This eliminates the
limitations of relying solely on library resources and ensures that students have a
reliable and readily available reference material throughout their studies.

Thank you for your time and consideration. I am available to provide any additional
information or discuss further details regarding the adoption of the Student Activity
Sheets. I look forward to a positive response and the potential implementation of this
valuable resource.

Sincerely ,

MELANIE ALBARRACIN
Instructor

Approval Recommended:

CHRISTINE JOY A. TOMOL HELMER M. BANADOS


Chair, BSIT Department Dean, CoTE

Approved:

EINGILBERT C. BENOLIRAO
Campus Director

v
TABLE OF CONTENTS

Preface ------------------------------------------------------------------------------------------- i

Instructional Materials Committee Request for Approval --------------------------- ii

Course Guide ----------------------------------------------------------------------------------- vii

SAS Week 1 : Introduction to Data Structures and Algorithms ------------------- 1

SAS Week 2 : Python Primer -------------------------------------------------------------- 9

SAS Week 3 – 4: Data Structures – Arrays in Python ------------------------------- 14

SAS Week 5 – 6: Linked Lists ------------------------------------------------------------- 26

SAS Week 7 – 9 : Stacks, Queues and Deques -------------------------------------- 34

SAS Week 10 – 11: Tree Data Structure ----------------------------------------------- 43

SAS Week 12 – 13 : Search Trees – Binary Search Trees ------------------------ 52

SAS Week 14 : AVL Trees ------------------------------------------------------------------ 57

SAS Week 15 : Multi – Way Trees-------------------------------------------------------- 64

SAS Week 16 – 17 : Red – Black Trees ------------------------------------------------ 70

Syllabus ----------------------------------------------------------------------------------------- 79

vi
COLLEGE OF TECHNOLOGY AND ENGINEERING
Information Technology Department

COURSE GUIDE
Course: CC214/CC214L DATA STRUCTURES Credit Units 3.0 lab
AND ALGORITHM 2.0 lec
ST
Term Offered: 1 Semester 2022 – 2023 Total Hours 190
Instructor MELANIE R. ALBARRACIN
Pre-Requisite CC 123 / CC 123 L
Course Description
The course covers the standard data representation and algorithms to solve computing
problems efficiently (with respect to space requirements and time complexity of
algorithms). This covers the following: Stacks, Queues, Trees, Graphs, Maps and Sets.
Through sorting and searching algorithms and hashing is covered.
Course Learning Outcomes
CLO1 Design, implement, test and debug a program based on a given specification that uses
and implement abstract data types (stacks, queues, priority queues, sets, maps).
(Introducing: IT01, IT06, IT07, IT09, IT10, IT12, IT13; Enabling: IT02, IT03)
CLO2 Argue strengths and weaknesses among multiple implementations for a problem (e.g. on
the aspects of iterative or recursive solutions and on the aspects of abstraction,
encapsulation and information hiding). (Introducing: IT01, IT06, IT07, IT09, IT10, IT12,
IT13; Enabling: IT02, IT03)

Topics / Modules and Intended Learning Outcomes


Topic 1: INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS

ILO: Test the different approaches to designing algorithms and different notations for evaluating
the performance of algorithms. (CLO1, CLO2)

Topic 2: PYTHON PRIMER


 Python Cheat Sheet
ILO: Create programs using Python programming languages
Translate simple algorithms into Python code

Topic 3: DATA STRUCTURES – ARRAYS


 Arrays
 Dynamic Arrays
ILO: Use the single and double subscripted arrays to store, sort and search lists and tables of
values(CO1)
Topic 4: LINKED LISTS
 Singly Linked List
 Doubly Linked List
ILO : Create and test the different types of linked list and the operations that can be performed
on these lists (CO1)

vii
Topic 5: STACKS, QUEUES AND DEQUES
 Stacks
 Queues
 Double Ended Queues (Deques)
ILO: Create programs using stacks , queues and deques implementation.(CO1)

Topic 6: TREE DATA STRUCTURE


 General Trees
 Binary Trees
 Binary Tree Traversal
ILO : Demonstrate knowledge on the concepts of tree data structures
Implement the basic tree operations (insertion, search and traversals (CO2)
Topic 7: SEARCH TREES – BINARY SEARCH TREE
ILO: Explore and differentiate the searching and sorting algorithms such as binary search
tree(CO1)
Topic 8: AVL TREES
ILO: Write and execute programs to implement the binary search tree and AVL trees(CO1)
Topic 8: MULTI - WAY TREES
ILO: Implement programs to explore the different types of multi-way search trees such as B-
Trees and B +Trees (CO1)
Topic 8: RED - BLACK TREES
ILO: Implement the red-black tree operations (insertion, search and deletion in the program
(CO1)

viii

You might also like