---
id: PURQ
title: "Point Update Range Query"
author: Benjamin Qi
prerequisites:
description: Range queries for any associative operation over an array with updates using segment tree.
frequency: 1
---
import { Problem } from "../models";
export const metadata = {
problems: {
sample: [
new Problem("YS", "Point Set Range Composite", "point_set_range_composite", "Intro", false, ["PURQ"], ""),
],
general: [
new Problem("CSES", "Range Minimum Queries II", "1649", "Intro", false, ["PURQ"], ""),
new Problem("Gold", "Springboards", "995", "Normal", false, ["PURQ"], "min segtree"),
new Problem("Plat", "Nocross", "721", "Normal", false, ["PURQ"], "LIS variation"),
]
}
};
A **segment tree** allows you to do point update and range query in $O(\log N)$ time each for any associative operation.
For gold, you only need to know the basics (ex. sum, min queries). More advanced applications (such as *lazy propagation*) are restricted to platinum.
### Tutorials
interactive
simple implementation
same implementation as above
### Problems
Can also try solving some of the BIT questions w/ segtree.