Skip to content

Add Quick Sort implementation in Pytho#199

Merged
Pradeepsingh61 merged 1 commit into
mainfrom
add-python-quick-sort
Oct 1, 2025
Merged

Add Quick Sort implementation in Pytho#199
Pradeepsingh61 merged 1 commit into
mainfrom
add-python-quick-sort

Conversation

@Karanjot786

Copy link
Copy Markdown
Collaborator

📝 Description

This PR adds a comprehensive Quick Sort algorithm implementation in Python with both in-place sorting and wrapper
functions.

📂 Files Added

  • Python/algorithms/sorting/quick_sort.py

✨ Features

  • Partition function: Correctly places pivot and partitions array
  • Quick Sort: Recursive divide-and-conquer implementation
  • Wrapper function: Returns sorted copy without modifying original array
  • Comprehensive test cases: 5 different test scenarios including:
    • Random unsorted array
    • Already sorted array
    • Reverse sorted array
    • Array with duplicates
    • Single element array

📊 Complexity Analysis

  • Time Complexity: O(n log n) average case, O(n²) worst case
  • Space Complexity: O(log n) due to recursion stack

✅ Testing

All test cases run successfully and demonstrate correct sorting behavior across different input scenarios.

🎃 Hacktoberfest 2025

This contribution is part of Hacktoberfest 2025. The code follows the repository's structure (Language/Topic/FileName) and
includes proper documentation.

📋 Checklist

  • Code follows repository structure (Python/algorithms/sorting/)
  • Proper documentation and comments added
  • Test cases included
  • Time and space complexity documented
  • No user input required (tests run automatically)
  • Code is well-formatted and readable

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown

🎉 Welcome to Hacktoberfest 2025, @Karanjot786! 🎃

Thank you for your first contribution to our DSA repository! Here's what happens next:

🔍 Automatic Checks

  • Code Validation: Passed
  • 🧪 Compilation Tests: Passed

📋 Next Steps

🎯 Great job! Your code compiled successfully. Maintainers @Karanjot786 and @Pradeepsingh61 will review your PR soon.

🎁 What You Get

  • 🏆 Hacktoberfest Credit: This PR counts toward your 6 PR goal for exclusive T-shirt + Tree!
  • 🌟 Hall of Fame: You'll be featured in our contributors list
  • 📚 Learning: Code review feedback from experienced developers

💡 Tips for Success

  • Follow our Contributing Guidelines
  • Add comments explaining your algorithm
  • Include time/space complexity analysis
  • Test your code before submitting

Welcome to the community! 🚀

@github-actions

github-actions Bot commented Oct 1, 2025

Copy link
Copy Markdown

🤖 Automated PR Status

🔍 Code Validation

Passed - File naming and structure look good!

🧪 Compilation Tests

Passed - All code compiles successfully!

📋 Overall Status

🎉 Ready for Review - Your PR has passed all automated checks!
👥 Maintainers have been notified for review.


This comment was generated automatically. Checks will re-run when you push new commits.

@Pradeepsingh61 Pradeepsingh61 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR

@Pradeepsingh61 Pradeepsingh61 merged commit 9ef04c1 into main Oct 1, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants