Blog
First Journal
Heap Sort
Posted 2025-11-16 | *By : Cuneyt Yildirim *# Heap Sort
Problem Statement
Given an unsorted array of n elements, write a function to sort the array
Approach
- Build a max heap from the input data.
- At this point, the largest item is stored at the root of the heap. Replace it with the last …
First Journal
Insertion Sort
Posted 2025-11-16 | *By : Cuneyt Yildirim *# Insertion Sort
Problem Statement
Given an array of n elements, write a function to sort the array in increasing order.
Approach
- Define a “key” index, the subarray to the left of which is sorted.
- Initiate “key” as …
First Journal
Merge Sort
Posted 2025-11-16 | *By : Cuneyt Yildirim *# Merge Sort (Divide and Conquer Algorithm)
Problem Statement
Given an array of n elements, write a function to sort the array
Approach
- Find a mid point and divide the array into to halves based on the mid point
- Recursively call the merge sort …