Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Sorting
1.7k+ articles
Searching
1.7k+ articles
Binary Search
510+ articles
Order-Statistics
65 articles
statistical-algorithms
50 articles
median-finding
67 posts
Popular Articles
Recent Articles
Minimum Sum of Euclidean Distances to all given Points
Last Updated: 13 May 2024
Given a matrix mat[][] consisting of N pairs of the form {x, y} each denoting coordinates of N points, the task is to find the minimum sum o
...read more
Arrays
Mathematical
Geometric
median-finding
DSA
Find the length of the median of a Triangle if length of sides are given
Last Updated: 06 January 2024
Given the length of all three sides of a triangle as a, b and c. The task is to calculate the length of the median of the triangle. A media
...read more
Mathematical
Geometric
triangle
median-finding
DSA
Finding Median of unsorted Array in linear time using C++ STL
Last Updated: 07 August 2020
Given an unsorted array arr[] having N elements, the task is to find out the median of the array in linear time complexity.Examples:Input: N
...read more
Arrays
Algorithms
Mathematical
Competitive Programming
STL
C++
C++ Programs
median-finding
Write From Home
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Sorting
1.7k+ articles
Searching
1.7k+ articles
Binary Search
510+ articles
Order-Statistics
65+ articles
statistical-algorithms
50+ articles
Median of an Array
Last Updated: 04 March 2025
Given an array arr[], the task is to find the median of this array.The median of an array of size n is defined as the middle element when n
...read more
Arrays
Algorithms
Divide and Conquer
Competitive Programming
Quick Sort
median-finding
DSA
Median of sliding window in an array
Last Updated: 20 October 2023
Given an array of integer arr[] and an integer k, the task is to find the median of each window of size k starting from the left and moving
...read more
Arrays
Tree
Dynamic Programming
Sorting
Binary Search Tree
sliding-window
Java Programs
median-finding
DSA
Array element with minimum sum of absolute differences
Last Updated: 23 November 2023
Given an array arr[] of N integers, the task is to find an element x from the array such that |arr[0] - x| + |arr[1] - x| + |arr[2] - x| + .
...read more
Arrays
Sorting
C++ Programs
median-finding
array-traversal-question
DSA
Minimum Increment / decrement to make array elements equal
Last Updated: 25 July 2022
Given an array of integers where[Tex]1 \leq A[i] \leq 10^{18}[/Tex]. In one operation you can either Increment/Decrement any element by 1. T
...read more
Greedy
Sorting
Mathematical
median-finding
DSA
Mean and Median of a matrix
Last Updated: 13 September 2023
Given a sorted matrix of size n*n. Calculate the mean and median of the matrix .Examples:Input : 1 2 3 4 5 6 7 8 9Output :Mean
...read more
Order-Statistics
Algorithms
Mathematical
Matrix
statistical-algorithms
median-finding
maths-mean
DSA
Mean of an Array
Last Updated: 18 March 2025
Given an array arr[]. The task is to find the mean(floor value) of the array.Examples:Input: arr[] = [1, 3, 4, 2, 6, 5, 8, 7]Output: 4Explan
...read more
Arrays
Order-Statistics
Algorithms
Sorting
Mathematical
statistical-algorithms
median-finding
maths-mean
DSA
Basic Coding Problems
Find median in row wise sorted matrix
Last Updated: 23 January 2025
Given a row-wise sorted matrix mat[][] of order n * m, where the number of rows and columns are always odd. The task is tofind the median of
...read more
Order-Statistics
Binary Search
Matrix
statistical-algorithms
median-finding
DSA
Find median of BST
Last Updated: 21 February 2023
Given a Binary Search Tree, find the median of it.If number of nodes are even: then median = ((n/2th node + ((n)/2th+1) node) /2If number of
...read more
Order-Statistics
Amazon
Google
Binary Search Tree
statistical-algorithms
Traversal
median-finding
DSA
Randomized Algorithms | Set 3 (1/2 Approximate Median)
Last Updated: 27 March 2023
We strongly recommend to refer below articles as a prerequisite of this.Randomized Algorithms | Set 1 (Introduction and Analysis)Randomized
...read more
Randomized
statistical-algorithms
median-finding
DSA
Median of two Sorted Arrays of Different Sizes
Last Updated: 27 April 2025
Given two sorted arrays, a[] and b[], the task is to find the median of these sorted arrays. Assume that the two sorted arrays are merged an
...read more
Binary Search
Divide and Conquer
Searching
statistical-algorithms
median-finding
DSA
Find Median from Running Data Stream
Last Updated: 17 February 2025
Given a data stream arr[] where integers are read sequentially, the task is to determine the median of the elements encountered so far after
...read more
Microsoft
Amazon
Adobe
Yahoo
Google
Morgan Stanley
Oracle
Facebook
Belzabar
Hike
MAQ Software
SAP Labs
Ola Cabs
FactSet
Mathematical
Heap
array-stream
statistical-algorithms
Apple
median-finding
DSA
Median of two sorted arrays of same size
Last Updated: 02 January 2025
Given 2 sorted arrays a[] and b[], each of size n, the task is to find the median of the array obtained after merging a[] and b[]. Note: Sin
...read more
Arrays
Amazon
Samsung
D-E-Shaw
Accolite
FactSet
Divide and Conquer
Searching
Mathematical
statistical-algorithms
median-finding
DSA
1
2
3
4
5
>>
Last
1
2
3
4
5
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !