CodeDaily
Topics
DSA
Arrays & Strings
Recursion
Trees & Graphs
Dynamic Programming
Linked Lists
View all →
Web Dev
Frontend
Backend
Full Stack
DevOps
APIs & REST
View all →
AI & ML
Machine Learning
Deep Learning
Computer Vision
NLP
Data Science
View all →
Blockchain
Smart Contracts
DeFi
Web3
Solidity
NFTs & Tokens
View all →
Questions
Level 1 · Easy
Patterns
Linked Lists
Stacks and Queues
Binary Tree
Graphs
2D Arrays
Hashmap And Heap
All Level 1 →
Level 2 · Medium
Arrays and Strings
Dynamic Programming
Trees
Graphs
Linked List
Stacks
Bit Manipulation
All Level 2 →
Level 3 · Hard
Maths
Segment Tree
Game Theory
Number Theory
Geometry
Digit DP
Range Queries
All Level 3 →
Compiler
Python
JavaScript
Java
C++
C
TypeScript
Go
Rust
Kotlin
Swift
Ruby
C#
Dart
PHP
Zig
Perl
Haskell
Julia
F#
OCaml
Pascal
COBOL
All languages →
Contests
Sign In
CodeDaily
Topics
DSA
Web Dev
AI & ML
Blockchain
Cybersecurity
Cloud
DevOps
Mobile
System Design
Questions
Level 1 · Easy
Patterns
Linked Lists
Stacks and Queues
Binary Tree
Graphs
2D Arrays
Hashmap And Heap
Level 2 · Medium
Arrays and Strings
Dynamic Programming
Trees
Graphs
Linked List
Stacks
Bit Manipulation
Level 3 · Hard
Maths
Segment Tree
Game Theory
Number Theory
Geometry
Digit DP
Range Queries
Compiler
Python
JavaScript
TypeScript
Java
C++
C
Go
Rust
Kotlin
Swift
Ruby
C#
Dart
PHP
Zig
Perl
Haskell
Julia
F#
OCaml
Pascal
COBOL
All languages →
Contests
Sign In
DSA
Level 3
Competitive
Range Queries
Square Root Decomposition
Square Root Decomposition
hard
Range Queries
Question
Solve
Solutions
Python
Python
JavaScript
Java
C++
Run
I/O
Results
Input
4 2 4 3 1 4 1 2 1 3 2 2 0 1
Output
Click Run to execute
No submissions yet
Python
JavaScript
Java
C++
Previous
Moksh And His Girlfriend
Next
Point Update In Square Root Decomposition
Related Questions
medium
Range Addition
hard
Moksh And His Girlfriend
hard
Point Update In Square Root Decomposition
hard
Fenwick Tree
hard
2d Binary Indexed Tree
hard
Create Sorted Array Through Instructions
medium
Sparse Table
Video Explanation
0:00 / 0:00