Data Structure
Java
Python
HTML
Interview Preparation
Interview Prep
Tutorials
Tracks
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Mathematical
5.1K+ articles
Greedy
1.4K+ articles
C Language
1.3K+ articles
Sorting
1.1K+ articles
subarray
658+ articles
array-range-queries
376+ articles
maths-perfect-square
114+ articles
root
19+ articles
square-root-decomposition
6 posts
Recent Articles
Popular Articles
Minimum cost to reduce A and B to 0 using square root or divide by 2
Last Updated: 23 July 2025
Given two integers A and B, the task is to convert the given two integers to zero at minimal cost by performing the following two types of operations:Replace both integers...
read more
DSA
square-root-decomposition
Square root of a number by Repeated Subtraction method
Last Updated: 15 July 2025
The Repeated Subtraction method for finding the square root of a number is an interesting approach. It involves repeatedly subtracting consecutive odd numbers from the num...
read more
DSA
maths-perfect-square
Natural Numbers
square-root-decomposition
Find sum of product of every number and its frequency in given range
Last Updated: 15 July 2025
Given an array arr[] of integers and an array of queries, the task is to find the sum of product of every number and its frequency in given range [L, R] where each ranges ...
read more
Greedy
Sorting
Mathematical
DSA
Arrays
array-range-queries
maths-perfect-square
square-root-decomposition
C program to find square root of a given number
Last Updated: 15 July 2025
Given a number N, the task is to write a C program to find the square root of the given number N.Examples:Input: N = 12Output: 3.464102Input: N = 16Output: 4Method 1: Usin...
read more
C Language
root
square-root-decomposition
Queries for elements having values within the range A to B using MO's Algorithm
Last Updated: 12 July 2025
Prerequisites: MO's algorithm, SQRT DecompositionGiven an array arr[] of N elements and two integers A to B, the task is to answer Q queries each having two integers L and...
read more
DSA
array-range-queries
square-root-decomposition
Number of elements less than or equal to a number in a subarray : MO's Algorithm
Last Updated: 12 July 2025
Given an array arr of size N and Q queries of the form L, R and X, the task is to print the number of elements less than or equal to X in the subarray represented by L to ...
read more
DSA
subarray
square-root-decomposition