Array algorithms

This article includes links to some of the classic and popular Array algorithms.

Binary Search Algorithm and Implementations

What is Binary Search? Binary search is an algorithm used to search for a target element in an ordered or sorted list of values. A sorted list is a list in which all the values present in it are arranged in either ascending or descending order. Read More

Boyer-Moore Majority Voting Algorithm

The Boyer-Moore Majority Voting Algorithm is a technique used to find the majority element in a given array or sequence of elements in linear time using constant space. The majority element is the element that appears more than half of the time in the array. Read More

Rotating elements in Array using Juggling/Dolphins Algorithm

Juggling/Dolphin’s algorithm is a technique used for array rotation, which is the process of shifting the elements of an array to the left or right by a certain number of positions. This algorithm is efficient and is particularly useful in situations where you need to perform frequent array rotations in-place without using any extra space. Read More

Kadane's Algorithm to find Maximum subarray sum

Kadane’s algorithm is a simple and efficient technique used to solve the maximum subarray problem. This problem involves finding the contiguous subarray within a given array that has the maximum sum among all other contiguous subarrays. Read More

Dutch National Flag problem - sorting an array of 0s 1s 2s

The Dutch National Flag problem, which is also simplified as sorting an array containing 0s 1s 2s, is a classic computer science problem proposed by Edsger Dijkstra, a renowned Dutch computer scientist. Dijkstra named the algorithm after the tricolor flag of the Netherlands, which consists of three horizontal stripes in red, white, and blue. Read More