Skip to content

[FEATURE]: Improve Quicksort Algorithm with Better Space Complexity #1703

Closed as not planned

Description

@DevAnuragT

Motivation

This feature can decrease space complexity of quicksort algorithm and make it efficient.

Examples

This feature will replace use of extra arrays in quicksort function with simple swap functions.

Possible workarounds

No response

Additional information

No response

Activity

  1. Vishrut99 commented on Oct 1, 2024

    @Vishrut99

    I can do that please assign me the work

  2. added a commit that references this issue on Oct 2, 2024
    8a4e8c4
  3. Shlok-Agarwal-7 commented on Oct 2, 2024

    @Shlok-Agarwal-7

    is the issue still open?

  4. zaid-patel commented on Oct 2, 2024

    @zaid-patel

    hi there, as a data structures and algorithms enthusiast with great interest in javascript let me work on this issue. my leeetcode profile : https://leetcode.com/u/mzip19/

  5. appgurueu commented on Oct 2, 2024

    @appgurueu
    Collaborator

    This issue doesn't really make sense: We have two variants of quicksort, one which is in-place and another one which isn't. If anything one of them should be removed / merged with the other, or they should be differentiated based on this. I personally think the "pure functional" variant is nice because it makes the core idea if the algorithm a bit easier to see.

    (It should perhaps also be noted that the worst case space complexity for a naive quicksort is still linear, see https://appgurueu.github.io/2023/07/15/on-quicksort.html. That could indeed be improved by being clever about the order of the recursive calls and tail recursion.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions