Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

DataStructuresPascal

This repository contains exercises on dynamic memory, pointers, vectors, and matrices in Pascal. It demonstrates memory allocation, data manipulation, and safe disposal practices, showcasing foundational skills in data structures and low-level programming.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Dynamic Memory & Data Structures Exercises

This repository contains a collection of exercises focused on dynamic memory allocation, pointers, vectors, matrices, and data structures implemented in Pascal. It demonstrates practical skills in memory management, dynamic arrays, and safe memory disposal.

Features / Exercises

1. Search Algorithms

  • Sequential (Linear) Search
  • Binary Search on sorted arrays

2. Dynamic Vectors

  • Allocate, resize, insert, and delete elements dynamically
  • Extract even numbers into a new dynamic vector

3. Dynamic Matrices

  • Allocate, fill, display, and free dynamic matrices
  • Sum two matrices
  • Transpose a matrix

4. String Operations

  • Dynamic vector of positions for substring occurrences
  • Search for a substring at specific positions

5. Memory Management

  • Proper use of Allocate and Free for dynamic memory
  • Avoid memory leaks
  • Pointer-to-pointer logic for matrices

Skills Demonstrated

  • Dynamic memory allocation and deallocation
  • Pointer manipulation and stability
  • Indexing and element access in 1D and 2D dynamic arrays
  • Algorithm implementation (search, sort, insert, delete)
  • Safe handling of strings and dynamic sequences