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

Create MergreSort.py #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Arkadeep1910
Copy link

Merge sort is a divide-and-conquer algorithm that splits a list or array into smaller sublists, sorts those sublists, and then merges them in sorted order. It operates recursively and ensures a time complexity of 𝑂(𝑛log𝑛), which is efficient for large datasets. Let's break down the steps of merge sort:

Steps of Merge Sort:
Divide: The array is divided into two halves. This step is repeated for each sublist until each sublist contains only one element, as a single element is considered sorted.
Conquer (Sort): The sublists are then sorted recursively.
Combine (Merge): The sorted sublists are merged to produce a sorted array.

Merge sort is a divide and conquer algorithm that splits a list or array into smaller sublists, sorts those sublists, and then merges them back together in sorted order. It operates recursively and ensures a time complexity of 
𝑂
(
𝑛
log
⁡
𝑛
)
O(nlogn), which is efficient for large datasets. Let's break down the steps of merge sort:

Steps of Merge Sort:
Divide: The array is divided into two halves. This step is repeated for each sublist until each sublist contains only one element, as a single element is considered sorted.
Conquer (Sort): The sublists are then sorted recursively.
Combine (Merge): The sorted sublists are merged together to produce a sorted array.
@Arkadeep1910
Copy link
Author

Please accept this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant