Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added java sorting algo code #2024

Merged
merged 5 commits into from
Nov 10, 2024
Merged

Conversation

aditiverma-21
Copy link
Contributor

📥 Pull Request

Description

  1. Bubble Sort
    Bubble Sort repeatedly swaps adjacent elements if they are in the wrong order. This algorithm is simple but has a time complexity of O(n ^2), making it inefficient for large datasets
  2. Insertion Sort
    Insertion Sort builds the sorted array one item at a time, inserting each element into its correct position. Its time complexity is O(n ^2), but it is efficient for small arrays or nearly sorted data.
  3. Selection Sort
    Selection Sort repeatedly finds the minimum element and places it at the beginning. It has O(n ^2 ) time complexity, making it inefficient for large arrays but useful for smaller datasets or partially sorted data.
  4. Merge Sort
    Merge Sort is a divide-and-conquer algorithm that splits the array in half, recursively sorts each half, and merges them. It has a time complexity of O(nlogn) and is efficient for large datasets.
  5. Quick Sort
    Quick Sort is a divide-and-conquer algorithm that picks a pivot element, partitions the array around it, and sorts the partitions. It has an average time complexity of O(nlogn).

Fixes #1994

Copy link

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible.). If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

Copy link

⚡️ Lighthouse Report for the Deploy Preview of this PR 🚀

🔗 Site: Algo | Live Site

URL 🌐 Performance Accessibility Best Practices SEO 📊
/algo/ 🟡 66 🟢 96 🟡 71 🟡 86 📄
/algo/docs 🟡 50 🟢 96 🟡 75 🟢 100 📄
/algo/blog 🟡 65 🟢 92 🟢 96 🟡 86 📄

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels labels Nov 10, 2024
Copy link
Owner

@ajay-dhangar ajay-dhangar left a comment

Choose a reason for hiding this comment

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

Done

@ajay-dhangar ajay-dhangar merged commit 56950f3 into ajay-dhangar:main Nov 10, 2024
6 of 7 checks passed
Copy link

🎉🎉 Thank you for your contribution! Your PR #2024 has been merged! 🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Custom]: Adding java sorting algo code
2 participants