Skip to content
Permalink

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: Complete-Coding/DSA_using_Java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Complete-Coding/DSA_using_Java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: prashant/fix-quicksort-low
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 2 contributors

Commits on Jun 21, 2026

  1. fix(QuickSort): use low instead of hardcoded 0 in left recursive call

    The left recursive call passed a hardcoded 0 as the lower bound instead
    of low, so every left-partition call re-sorted the array from index 0
    rather than from the start of the current sub-problem. The result stayed
    correct (the [0, low-1] prefix is already in place) but recursion work
    blew up to O(n^2): on a descending array of 2000 elements the buggy
    version makes 1,001,001 quickSort invocations vs 3,999 after the fix,
    which is what can drive the reported StackOverflowError on large inputs.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
    omprashantjain and claude committed Jun 21, 2026
    Configuration menu
    Copy the full SHA
    8d842a6 View commit details
    Browse the repository at this point in the history
Loading