forked from keon/algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: stephyyi/algorithms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: keon/algorithms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 10 commits
- 16 files changed
- 13 contributors
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 <nbarubz@gmail.com>
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 <piyushgoel@Piyushs-MacBook-Air-4.local>
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 <kwk236@gmail.com> * 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 <kwk236@gmail.com> * 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 <kwk236@gmail.com> * 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 <kwk236@gmail.com> * 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 <kwk236@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Keon <kwk236@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5991e05 - Browse repository at this point
Copy the full SHA 5991e05View commit details
Loading
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