Metadata-Version: 2.4
Name: algorc
Version: 1.0.5
Summary: A collection of 15 essential C algorithms with a CLI
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# C Algorithms Collection (algorc)

A collection of 15 essential Data Structures and Algorithms (DSA) implemented in C, packaged as a Python library for easy access.

## Installation

You can install this collection on any computer using pip:

```bash
pip install algorc
```

## Usage

Once installed, you can use the `algorc` command followed by the program number (1-15):

```bash
algorc 1
```

Or run it directly using Python:

```bash
python -m algorc 1
```

## Available Programs

1.  **Binary Search**: Efficiently find an element in a sorted array.
2.  **Linear Search**: Simple search for an element in an array.
3.  **Insertion Sort**: Stable sorting algorithm with $O(n^2)$ complexity.
4.  **Pattern Matching**: Naive string searching implementation.
5.  **BFS (Breadth First Search)**: Level-order traversal for graphs.
6.  **DFS (Depth First Search)**: Recursive depth-order traversal for graphs.
7.  **Dijkstra's Algorithm**: Single-source shortest path for weighted graphs.
8.  **Floyd Warshall Algorithm**: All-pairs shortest path calculation.
9.  **Prim's Algorithm**: Finding the Minimum Spanning Tree (MST).
10. **Maximum (Divide & Conquer)**: Finding the maximum element using recursion.
11. **Heap Sort**: Efficient comparison-based sorting using a binary heap.
12. **Quick Sort**: Fast divide-and-conquer sorting algorithm.
13. **Traveling Salesperson (Greedy)**: A greedy approach to the TSP problem.
14. **N-Queens Problem**: Backtracking solution for the classic puzzle.
15. **k-th Smallest Element**: Finding the k-th smallest element in an unsorted array.

## How to Run

To compile and run any program (e.g., Binary Search):

```bash
gcc c_programs/binary_search.c -o binary_search
./binary_search
```

*(Note: On Windows, use `binary_search.exe` instead of `./binary_search`)*
