---
title: "#57q5q615qcr articles | Hashnode"
description: "Explore 1 articles tagged #57q5q615qcr on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/57q5q615qcr"
---

Tag

# #57q5q615qcr

1 posts · 0 followers

[MrHe](https://hashnode.com/@MrHe) · [Oct 4, 2025](https://hashnode.com/posts/57q5q615qcrleagkew9oue7kaeha/68e11e695606a98ecb5bc360)

### [线段树-树形结构](https://xiaoh.hashnode.dev/57q5q615qcrleagkew9oue7kaeha?utm_source=hashnode&utm_medium=feed)

线段树，顾名思义，就是用来处理区间或线段问题的树形结构。它能高效地解决一类问题：对一个数组进行频繁的区间查询和元素更新。如果你看到一个问题，反复地问你“从L到R这个范围内的xx是什么？”或者“把L到R这个范围内的数都改成xx”，那线札树可能就是你的答案。 它的核心思想就是“分治”。把一个大区间，一分为二，变成两个小区间，直到每个区间只包含一个元素。这样，一个长度为N的数组，就对应了一棵满二叉树（或近似满二叉树），树的深度是 O(logN)。每一次查询和更新，我们都只需要沿着树的一条路径走到底，所...

9 min read · [xiaoh.hashnode.dev](https://xiaoh.hashnode.dev/57q5q615qcrleagkew9oue7kaeha?utm_source=hashnode&utm_medium=feed)
