Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit 6c0426c

Browse files
author
akshat
committed
added README
1 parent cbcd9b6 commit 6c0426c

File tree

3 files changed

+91
-0
lines changed

3 files changed

+91
-0
lines changed

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing to Efficient Sort Function in JavaScript
2+
3+
Thank you for your interest in contributing to this project! We welcome contributions from the community.
4+
5+
## Getting Started
6+
7+
To contribute, follow these steps:
8+
9+
1. Fork the repository.
10+
2. Create a new branch for your feature or bug fix: `git checkout -b feature-name`.
11+
3. Make your changes and commit them: `git commit -m 'Add new feature'`.
12+
4. Push to the branch: `git push origin feature-name`.
13+
5. Open a pull request.
14+
15+
## Code Style
16+
17+
Please adhere to the project's coding style and formatting. Use descriptive variable and function names to enhance readability.
18+
19+
## Testing
20+
21+
Ensure that your changes do not break existing functionality. Write tests for new features or bug fixes.
22+
23+
## Reporting Issues
24+
25+
If you encounter any issues or have suggestions, please open an issue on the repository. Provide a clear description of the problem or enhancement.
26+
27+
## License
28+
29+
By contributing to this project, you agree that your contributions will be licensed under the [MIT License](LICENSE)

LEARN.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Learn about Efficient Sorting
2+
3+
This document provides information and resources to help you understand the efficient sorting function implemented in this project.
4+
5+
## Sorting Algorithms
6+
7+
### Quicksort
8+
9+
Quicksort is an efficient in-place sorting algorithm. It works by selecting a 'pivot' element and partitioning the other elements into two sub-arrays.
10+
11+
### Mergesort
12+
13+
Mergesort is a divide and conquer algorithm that divides the input array into two halves, sorts each half, and then merges the sorted halves.
14+
15+
## How the Sorting Function Works
16+
17+
The sorting function implemented in this project intelligently selects between quicksort and mergesort based on the characteristics of the input array.
18+
19+
### Quick Sort
20+
21+
- Used for smaller arrays (<= 899 elements).
22+
- Tail-recursive implementation for optimization.
23+
24+
### Merge Sort
25+
26+
- Used for larger arrays (> 899 elements).
27+
- Recursively splits and merges the array.
28+
29+
## Further Reading
30+
31+
- [Quicksort - Wikipedia](https://en.wikipedia.org/wiki/Quicksort)
32+
- [Mergesort - Wikipedia](https://en.wikipedia.org/wiki/Merge_sort)

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Efficient Sort Function in JavaScript
2+
3+
[![DeepScan grade](https://deepscan.io/api/teams/23370/projects/26710/branches/851719/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=23370&pid=26710&bid=851719)
4+
[![DeepSource](https://app.deepsource.com/gh/IntegerAlex/efficient-sorting.svg/?label=resolved+issues&show_trend=true&token=Mq0EjM82kW9g-fqGW92fzEBe)](https://app.deepsource.com/gh/IntegerAlex/efficient-sorting/)
5+
[![CodeScene Code Health](https://codescene.io/projects/51175/status-badges/code-health)](https://codescene.io/projects/51175)
6+
7+
This project provides a JavaScript implementation of an efficient sorting function that dynamically determines the sorting method based on the characteristics of the input array.
8+
9+
## Introduction
10+
11+
The goal of this project is to create a sorting function that intelligently selects the most suitable sorting algorithm based on the size and nature of the input array. By dynamically choosing between quicksort and mergesort, the function aims to optimize performance for different scenarios.
12+
13+
## Usage
14+
15+
```javascript
16+
npm install efficient-sorting
17+
```
18+
19+
```javascript
20+
import Sort from 'efficient-sorting'
21+
let array = [10,20,45,2,1,19,17]
22+
console.log(Sort(array))
23+
```
24+
25+
To use the sorting function in your JavaScript project, follow these steps:
26+
27+
1. Clone the repository:
28+
29+
```bash
30+
git clone https://github.com/IntegerAlex/efficient-sorting.git

0 commit comments

Comments
 (0)