ShareHub

Discover and share articles, posts, and links from across the web.

Majority Element

Majority Element

Apex Shark · 3/22/2026

Problem Statement Given an array arr[], find the majority element in the array. A majority element is an element that appears strictly more than arr.size()/2...

CA 10 - Kadanes Algorithm

CA 10 - Kadanes Algorithm

Apex Shark · 3/22/2026

The Problem Given an array of integers. The Task is to find the maximum sum of a contiguous subarray. Example: Input: [2, 3, -8, 7, -1, 2, 3] Output: 11 Idea...