data-structures-and-algorithms

This repository is going to be for problem solving tasks provided by ASAC team - Java Advanced course

View project on GitHub

Challenge Summary

This challenge asks me to sort an array using merge sort algorithm.

Whiteboard Process

Approach & Efficiency

Merge sort is a sorting algorithm that divides the array into two parts recursively until we have individual elements then we sort each half and return until we have the full array back sorted.

Solution

  • Time: O(nlog(n))
    • The basic operation of this algorithm is dividing the array into two parts recursively until we have individual elements then we sort each half and return until we have the full array back sorted.
  • Space: O(n)