GitHunt
DA

C CLI application demonstrating array operations including random generation, linear and binary search, quicksort sorting, and merging of arrays with file input/output support (Data Structures, UNIWA).

UNIWA

UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS

University of West Attica · Department of Computer Engineering and Informatics


Data Structures

Arrays

Vasileios Evangelos Athanasiou
Student ID: 19390005

GitHub · LinkedIn


Supervision

Supervisor: Georgios Bardis, Assistant Professor

UNIWA Profile

Co-supervisor: Georgios Meletiou, Laboratory Teaching Staff

UNIWA Profile

Co-supervisor: Georgios Tselikis, Postdoctoral Researcher

UNIWA Profile · LinkedIn


Athens, November 2022



README

Arrays

A command-line interface (CLI) application written in C that performs various algorithmic operations on an array of random integers.


Table of Contents

Section Folder/File Description
1 INSTALL.md Installation and compilation instructions
2 README.md Project overview and usage guide
3 assign/ Assignment description images
3.1 assign/Arrays.png Arrays assignment image (English)
3.2 assign/Πίνακες.png Arrays assignment image (Greek)
4 src/ Source code and related input files
4.1 src/arrays.c Main C source file implementing array operations
4.2 src/arr/ Sample array input files
4.2.1 src/arr/array_N10.txt Example array input with 10 elements
4.2.2 src/arr/array_N20.txt Example array input with 20 elements

1. Features

1.1 Dynamic Array Generation

Creates an array of size N and populates it with random integers between 30 and 50.

1.2 Search Algorithms

Serial Search

  • Linear scan of the array
  • Counts the number of iterations required to find the element

Binary Search

  • Recursive implementation
  • Automatically sorts the array before searching
  • Time complexity: O(log n)

2. Sorting

2.1 Quicksort Algorithm

The program sorts the array using Quicksort with pivot-based partitioning (Hoare/Lomuto style).


3. Merging

  • Generates a second random array
  • Sorts both arrays
  • Merges them into a single sorted array of size 2N

4. File Persistence

Exports the array contents into a formatted text file stored in a dedicated directory.

Data-Structures-aka-Uniwa/Arrays | GitHunt