Pradeepsingh61/DSA_Code

[REQUEST] Add Merge Sort in Java

開放

#658 建立於 2025年10月25日

 (2 則留言) (0 個反應) (1 位負責人)C++ (266 個分叉)auto 404
algorithmsenhancementhacktoberfestnew-language

倉庫指標

星標
 (52 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Algorithm Name

Merge Sort

Programming Language

Java

Category

Sorting

Difficulty Level

Medium (Intermediate)

Algorithm Description

Merge Sort is a divide-and-conquer algorithm that splits an array into two halves, recursively sorts each half, and then merges the sorted halves to form a fully sorted list. It is highly efficient with a time complexity of O(n log n) in the worst, average, and best cases, making it reliable compared to algorithms like Quick Sort, which may degrade to O(n²). Merge Sort is a stable sorting algorithm, preserving the order of equal elements, and performs well with large datasets. It is also ideal for linked lists and external sorting where data cannot fit into memory, as merging is easily managed on disk.

References (Optional)

No response

Contribution Intent

  • I would like to implement this algorithm myself
  • I'm requesting this for someone else to implement
  • I need help implementing this algorithm

Code of Conduct

  • I agree to follow this project's Code of Conduct

貢獻者指南