# Repository Overview

Welcome to this repository. This project appears to be a small Java application centered on algorithm visualization, with a strong focus on sorting. It uses standard Swing and AWT classes for its user interface, and the code suggests a simple desktop workflow rather than a web or service architecture. If you're new here, the fastest way to understand it is to follow the path from algorithm selection to input parsing to the sorting implementations themselves.

## Overview

This repository appears to provide a basic sorting demo or teaching tool. A user selects a sorting algorithm, enters a list of integers, and the application displays the sorted output. The codebase is compact and self-contained, with most of the logic living in one module and no obvious third-party framework dependencies.

The main experience seems to be interactive and UI-driven:

- choose a sorting algorithm from a menu
- enter numbers as space-separated text
- run the sort and view the result
- optionally open a matching source text file in Notepad

## Technology Stack

The detected stack is intentionally lightweight:

- **Language:** Java
- **UI toolkit:** Swing and AWT
- **Runtime behavior:** desktop GUI application
- **External process integration:** launches `Notepad.exe` for the "Open Code" action

No well-known application frameworks were detected from import analysis.

## Architecture

The code appears to follow a simple two-window flow. A menu window lets the user choose an algorithm, then a second window handles input, sorting, and output. The `Sortingss` class acts as the central controller/view, while the helper classes implement the recursive sorting algorithms.

```mermaid
flowchart TD
    RepoOverview["Repository Overview"] --> AlgoCalc["algo_Calc module"]
    AlgoCalc --> FrameClass["Frame"]
    AlgoCalc --> SortingssClass["Sortingss"]
    SortingssClass --> QuiksClass["quiks"]
    SortingssClass --> MergClass["merg"]
    SortingssClass --> HeapsClass["heaps"]
```

At a high level:

- `Frame` presents the algorithm selection menu.
- `Sortingss` owns the main sorting window and dispatch logic.
- `quiks`, `merg`, and `heaps` provide algorithm-specific implementations used by `Sortingss`.

## Module Guide

### `algo_Calc`

This appears to be the only top-level module in the repository, and it contains the full application. The module focuses on sorting algorithms and the UI needed to demonstrate them. The main classes are `Frame`, which opens the selection screen, and `Sortingss`, which handles the sorting workflow and contains the helper algorithm classes `quiks`, `merg`, and `heaps`.

### `Frame`

`Frame` appears to be the entry menu for the application. It shows the available sorting choices and forwards the selected option into `Sortingss.vis(...)`. This class keeps the first screen simple and delegates the actual sorting experience to the main window.

### `Sortingss`

`Sortingss` appears to be the heart of the program. It builds the main window, accepts user input, chooses the algorithm based on a numeric key, runs the sort, and renders the result. It also contains the inline implementations for some sorts and the button action that opens an algorithm-specific text file in Notepad.

### `quiks`

`quiks` appears to implement quick sort. It is used when the quick sort option is selected and provides a recursive `quickSort(...)` driver plus a `partition(...)` helper.

### `merg`

`merg` appears to implement merge sort. It provides the recursive divide-and-conquer sort logic and a merge helper that combines two sorted halves back into the original array.

### `heaps`

`heaps` appears to implement heap sort. It provides the heap maintenance logic and the routine that builds a max heap and extracts values into sorted order.

## Getting Started

If you're exploring the code for the first time, a good reading order is:

1. **`src/algo_Calc/Frame.java`** — start here to understand how the application launches and how algorithm selection works.
2. **`src/algo_Calc/Sortingss.java`** — then read the main window logic, because this is where input handling and dispatch happen.
3. **`quiks`, `merg`, and `heaps` inside `Sortingss.java`** — review these helper classes to understand the non-inline algorithm implementations.
4. **The submit action inside `Sortingss.initialize()`** — this is the best place to see the full user flow from raw text input to sorted output.

If you want to understand behavior quickly, focus on these entry points and actions:

- `Frame.main(String[] args)`
- `Frame.initialize()`
- `Sortingss.main(String[] args)`
- `Sortingss.vis(int k, String str)`
- the submit button handler inside `Sortingss.initialize()`

Recommended first questions for a new developer:

- How does the selected algorithm get stored and passed between windows?
- Which sorts are implemented inline versus in helper classes?
- What input format does the parser expect?
- How does the "Open Code" button depend on the local environment?

## Notes for New Contributors

- The UI uses absolute positioning, so layout changes may require manual adjustment.
- Input parsing appears to expect integers separated by spaces and does not show strong validation.
- The `Open Code` feature is Windows-specific because it launches Notepad directly.
- The repository appears small enough that reading the main source file is likely enough to understand most of the behavior.
