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

  1. Concept of memory addresses

  2. Definition of a pointer variable

  3. Operations on pointer variables (initialization, assignment, dereferencing)

  4. Manipulation of pointed variables

  5. Pointers in C

  6. Static vs. dynamic allocation

  7. Dynamic allocation of an array

  8. Dynamic allocation of a structure (record)

  9. Memory deallocation

  10. Dynamic allocation/deallocation in C

Chapter 2: Parameterized Actions

  1. Importance of modularity (divide-and-conquer approach)

  2. Concept of a module (subroutine, function, procedure)

  3. Function/procedure declaration

  4. Function/procedure parameters

  5. Local vs. global variables

  6. Function/procedure calls

  7. Function return values

  8. Parameter passing (by value, by reference)

  9. Recursion

  10. Functions in C

Chapter 3: Linked Lists

  1. Linear lists and contiguous representation (arrays)

  2. Drawbacks of contiguous representation

  3. Singly linked lists

  4. Special linked lists

  5. Implementing linked lists in C

Chapter 4: Stack Data Structure

  1. Definition of a stack

  2. Importance of stacks (e.g., function call/return)

  3. Stack manipulation primitives

  4. Stack implementation

  5. Implementing a stack in C (contiguous and linked)

Chapter 5 Queue Data Structure

  1. Definition of a queue

  2. Importance of queues (e.g., waiting systems)

  3. Queue manipulation primitives

  4. Queue implementation

  5. Implementing a queue in C (contiguous and linked

Chapter 7: Files

  1. Main memory vs. secondary memory

  2. File definition (text files, binary files)

  3. Logical vs. physical files

  4. Associating a physical file with a logical file (file opening)

  5. File opening modes (read, write, append)

  6. End-of-file marker

  7. Files in C


Assessment Method:

Exam (60%), Continuous assessment (tutorials and lab tests) (40%).

Pr. Mohammed SALEM