Python
Python copied to clipboard
All Algorithms implemented in Python
Refactor palindrome functions to include type checks and remove unnecessary comments. ### Describe your change: * [ ] Add an algorithm? * [x] Fix a bug or typo in an...
### Describe your change: This update improves how the binary search function handles negative values passed to hi. Earlier, when hi was negative, the code reset it to len(sorted_collection), which...
### Feature description Hello, I was reviewing the code for the DDA algorithm (found in graphics/digital_differential_analyzer_line.py). The current docstring is very minimal. It only says: Draws a line between two...
### What would you like to share? Data Analysis Projects ### Additional information _No response_
I added new Unit Tests to increase test code coverage.
Fixes #13886 ### Describe your change: This pull request fixes the behavior of the `binary_search` algorithm when the input list contains duplicate elements. Previously, the algorithm returned the **middle duplicate...
Added file 241080078_file.py implementing Bubble Sort for Assignment 7.
### Describe your change: This PR implements the greedy approximation algorithm for the minimum set cover problem, a fundamental NP-complete problem in computer science with applications in resource allocation, scheduling,...
**Contributes to #9943** ## Description This PR includes two contributions: 1. **Hopcroft-Karp Algorithm Implementation**: Adds the Hopcroft-Karp algorithm for finding maximum matching in bipartite graphs, a fundamental graph algorithm with...