Python
Python copied to clipboard
All Algorithms implemented in Python
### Describe your change: * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [x] Add or change doctests? -- Note: Please...
This PR adds a new function `is_kaprekar_number(n)` under `maths/special_numbers/`. The function determines whether a number is a Kaprekar number based on digit-splitting logic, where the square of a number is...
### Summary Added an RC4 (Rivest Cipher 4) stream cipher algorithm under ciphers/ directory. - Implements KSA and PRGA phases. - Encrypts and decrypts using XOR. - Fully type hinted...
### Describe your change: * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? -- Note:...
### Describe your change: * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? -- Note:...
Contributes to #9943 This pull request refactors and improves the implementation of the Monte Carlo estimation functions: - Refactors functions to return values instead of printing, improving testability. - Adds...
### Describe your change: * [ ] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? --...
### Describe your change: * [x] Add an algorithm? * [ ] Fix a bug or typo in an existing algorithm? * [ ] Add or change doctests? -- Note:...
### Describe your change: * [ ] Add an algorithm? * [X] Fix a bug or typo in an existing algorithm? * [X] Add or change doctests? -- Note: Please...
### Describe your change: * [x] Add an algorithm This pull request adds a Python implementation of the **Count Inversions** algorithm using a modified Merge Sort approach. Count Inversions is...