Arrays
Fundamental collection of elements stored at contiguous memory locations.
Fundamentals
Sorting Algorithms
Bubble Sort
EasySimple comparison-based sorting algorithm.
Selection Sort
EasyRepeatedly finds the minimum element and puts it at the beginning.
Insertion Sort
EasyBuilds the sorted array one item at a time.
Quick Sort
MediumEfficient divide-and-conquer sorting algorithm.
Merge Sort
MediumStable divide-and-conquer sorting algorithm.
Heap Sort
MediumComparison-based sorting technique based on Binary Heap.
Counting Sort
MediumInteger sorting algorithm that counts number of objects.
Radix Sort
MediumNon-comparative integer sorting algorithm.
Bucket Sort
MediumDistribution sort that scatters elements into buckets.
Shell Sort
MediumGeneralization of insertion sort using gaps.
Searching Algorithms
Linear Search
EasySequentially checks each element of the list.
Binary Search
MediumSearch a sorted array by repeatedly dividing the search interval in half.
Jump Search
MediumSearching in sorted arrays by jumping fixed steps.
Interpolation Search
MediumImproved binary search for uniformly distributed data.
Exponential Search
MediumFind range where element is present, then binary search.
Algorithms
Two Pointers
MediumUse two pointers to iterate the array.
Sliding Window
MediumEfficiently find subarrays with specific properties.
Kadane's Algorithm
MediumFind the maximum sum contiguous subarray in O(n) time.
Prefix Sum
EasyPrecompute sums to allow O(1) range sum queries.
Dutch National Flag
MediumSort an array of 0s, 1s, and 2s in one pass.