Semester: 02
Teaching Unit: UEF 2.1
Course: Algorithms and Data Structures 2 (ASD2)
Credits: 6
Coefficient: 4
Public: First year Engineers of Computer Science
Course Objectives:
This module is a continuation of the ASD1 module from the first semester. It covers the concept of memory address manipulation through pointer types. A significant portion is dedicated to modularity and its importance in application development. The third chapter focuses on secondary memory (file) data manipulation and transfers between main and secondary memory. Emphasis is then placed on linked representations of linear lists as an alternative to contiguous representation. The data structures Stack and Queue are covered in detail at the end of the module.
Prerequisite Knowledge:
Basic understanding of algorithms and programming.
Course Content:
Chapter 1: Dynamic Variables and Address Manipulation
Concept of memory addresses
Definition of a pointer variable
Operations on pointer variables (initialization, assignment, dereferencing)
Manipulation of pointed variables
Pointers in C
Static vs. dynamic allocation
Dynamic allocation of an array
Dynamic allocation of a structure (record)
Memory deallocation
Dynamic allocation/deallocation in C
Chapter 2: Parameterized Actions
Importance of modularity (divide-and-conquer approach)
Concept of a module (subroutine, function, procedure)
Function/procedure declaration
Function/procedure parameters
Local vs. global variables
Function/procedure calls
Function return values
Parameter passing (by value, by reference)
Recursion
Functions in C
Chapter 3: Linked Lists
Linear lists and contiguous representation (arrays)
Drawbacks of contiguous representation
Singly linked lists
Special linked lists
Implementing linked lists in C
Chapter 4: Stack Data Structure
Definition of a stack
Importance of stacks (e.g., function call/return)
Stack manipulation primitives
Stack implementation
Implementing a stack in C (contiguous and linked)
Chapter 5 Queue Data Structure
Definition of a queue
Importance of queues (e.g., waiting systems)
Queue manipulation primitives
Queue implementation
Implementing a queue in C (contiguous and linked
Chapter 7: Files
Main memory vs. secondary memory
File definition (text files, binary files)
Logical vs. physical files
Associating a physical file with a logical file (file opening)
File opening modes (read, write, append)
End-of-file marker
Files in C
Assessment Method:
Exam (60%), Continuous assessment (tutorials and lab tests) (40%).
Pr. Mohammed SALEM