-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: nitmm/algorithms-for-python
base: master
head repository: keon/algorithms
compare: master
- 17 commits
- 28 files changed
- 21 contributors
Commits on Nov 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 52b9408 - Browse repository at this point
Copy the full SHA 52b9408View commit details
Commits on Mar 8, 2023
-
Fixed typos in two files (keon#898)
Co-authored-by: rahulrameshan <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2a129ba - Browse repository at this point
Copy the full SHA 2a129baView commit details -
modified the return from both main and helper. (keon#886)
It looks like there is no need to create a copy, we can replace the new elements inplace.
Configuration menu - View commit details
-
Copy full SHA for fd86fd1 - Browse repository at this point
Copy the full SHA fd86fd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e24247f - Browse repository at this point
Copy the full SHA e24247fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51f93c6 - Browse repository at this point
Copy the full SHA 51f93c6View commit details -
feat: add dynamic programming algorithm to strings.min_distance.py (k…
…eon#838) also added a small unit test to ensure the algorithm is correct fixes: keon#15 Co-authored-by: Philip Salqvist <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c0e5404 - Browse repository at this point
Copy the full SHA c0e5404View commit details
Commits on Apr 4, 2023
-
Update binary_search.py (keon#902)
* Update binary_search.py * Update first_occurrence.py
Configuration menu - View commit details
-
Copy full SHA for a336ee8 - Browse repository at this point
Copy the full SHA a336ee8View commit details
Commits on Feb 5, 2024
-
Optimize longest_non_repeat.py (keon#914)
Added window sliding approach to find longest non repeating sub string
Configuration menu - View commit details
-
Copy full SHA for 1117ffe - Browse repository at this point
Copy the full SHA 1117ffeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40c944c - Browse repository at this point
Copy the full SHA 40c944cView commit details -
Add Kosaraju algorithm (keon#910)
* added kosaraju's algorithm under /algorithms/graph * added test case for /algorithms/graph/strongly_connected_component_kosaraju --------- Co-authored-by: Rubal Singh <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e9c28af - Browse repository at this point
Copy the full SHA e9c28afView commit details -
Add remove duplicates (keon#905)
* Initial commit for remove duplicates * Made changes to readme and added test case
Configuration menu - View commit details
-
Copy full SHA for cad4754 - Browse repository at this point
Copy the full SHA cad4754View commit details
Commits on Jun 27, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 66eb36d - Browse repository at this point
Copy the full SHA 66eb36dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b04e60 - Browse repository at this point
Copy the full SHA 0b04e60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 486fa37 - Browse repository at this point
Copy the full SHA 486fa37View commit details
Commits on Oct 9, 2025
-
Added the validate bst function (keon#2696)
* Added the validate bst function * Added the validate bst function --------- Co-authored-by: Piyush Goel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 67287d2 - Browse repository at this point
Copy the full SHA 67287d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b63e90 - Browse repository at this point
Copy the full SHA 5b63e90View commit details
Commits on Nov 3, 2025
-
Optimize remove_duplicates from O(n²) to O(n) time complexity (keon#2700
) * Optimize remove_duplicates from O(n²) to O(n) time complexity Use a set for O(1) membership checks instead of checking membership in a list which is O(n). This reduces the overall time complexity from O(n²) to O(n). Added documentation for time and space complexity. Co-Authored-By: Keon <[email protected]> * Fix: Handle unhashable items in remove_duplicates The previous optimization broke when the function received unhashable items like lists or dicts, causing TypeError. This commit adds backward compatibility by checking if items are hashable: - Hashable items use set for O(1) lookup (fast path) - Unhashable items fall back to list membership check (preserves original behavior) This maintains the O(n) optimization for the common case while preserving backward compatibility for all input types. Co-Authored-By: Keon <[email protected]> * Fix: Apply black formatting to remove_duplicates.py Add blank lines after imports and before function definition to comply with black code formatting style, which is checked by CI. Co-Authored-By: Keon <[email protected]> * Fix: Remove unused nonlocal/global declarations (F824 errors) Remove unused nonlocal declarations in find_all_cliques.py and unused global declaration in construct_tree_postorder_preorder.py to fix flake8 F824 errors that were causing CI to fail. These declarations were unnecessary because: - In find_all_cliques: compsub and solutions are only mutated (append/pop), not reassigned, so nonlocal is not needed - In construct_tree: pre_index is never used or assigned in this function, only in construct_tree_util Also applied black formatting to both files. Co-Authored-By: Keon <[email protected]> * Fix: Resolve pre-existing test failures blocking CI Fix two pre-existing test failures that were causing CI to fail: 1. test_remove_duplicates: Added missing expected values to assertListEqual calls. The test was malformed with only input arrays but no expected outputs, causing TypeError. 2. test_summarize_ranges: Fixed summarize_ranges() to return tuples instead of strings. The function was converting tuples to formatted strings like '0-2', but tests expected tuples like (0, 2). Both fixes align implementations with test expectations and docstrings. Applied black formatting to both files. Co-Authored-By: Keon <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Keon <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5991e05 - Browse repository at this point
Copy the full SHA 5991e05View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master