Skip to content

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

Not planned
@DevAnuragT

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

Vishrut99

Vishrut99 commented on Oct 1, 2024

@Vishrut99

I can do that please assign me the work

added a commit that references this issue on Oct 2, 2024

>> git commit -m "Fixes: TheAlgorithms#1703 Improve QuickSort Algorit…

8a4e8c4
Shlok-Agarwal-7

Shlok-Agarwal-7 commented on Oct 2, 2024

@Shlok-Agarwal-7

is the issue still open?

zaid-patel

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/

appgurueu

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

      Participants

      @appgurueu@DevAnuragT@Shlok-Agarwal-7@zaid-patel@Vishrut99

      Issue actions

        [FEATURE]: Improve Quicksort Algorithm with Better Space Complexity · Issue #1703 · TheAlgorithms/JavaScript