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

Commits on Oct 19, 2024

  1. Create MergreSort.py

    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 authored Oct 19, 2024
    Configuration menu
    Copy the full SHA
    6f5a2dc View commit details
    Browse the repository at this point in the history