• LintCode题解
  • Introduction
  • Dynamic Programming
    • BackPack
      • Backpack I 92
      • Backpack II 125
      • Backpack III 440
      • Backpack IV 562
      • Backpack V 563
      • Backpack VI 564
    • House Robber 392
    • House Robber II 534
    • House Robber III 535
    • Paint Fence 514
    • Paint House 515
    • Paint House II 516
    • Coins in a Line 394
    • Coins in a Line II 395
    • Coins in a Line III 396
    • Longest Increasing Continuous Subsequence 397
    • Longest Increasing Continuous subsequence II 398
    • Maximal Square
    • Maximal Rectangle 510
    • Unique Binary Search Trees 163
    • Unique Binary Search Trees II 164
    • Unique Paths 114
    • Unique Paths II 115
    • Build Post Office 573
    • Build Post Office II 574
    • Post Office Problem 435
    • Perfect Squares 513
    • Longest Palindromic Substring 200
    • Stone Game 476
    • Bomb Enemy 553
    • Burst Balloons 168
    • Scramble String 430
    • Copy Books 437
    • Maximum Gap 400
    • Longest Common Subsequence 77
    • Interleaving String 29
    • Edit Distance 119
    • Distinct Subsequences 118
    • Dices Sum 20
    • Maximum Subarray III 43
    • Best Time to Buy and Sell Stock IV 393
    • k Sum 89
    • Minimum Adjustment Cost 91
    • Binary Tree Maximum Path Sum 94
    • Word Break 107
    • Palindrome Partitioning II 108
    • Triangle 109
    • Minimum Path Sum 110
    • Climbing Stairs 111
    • Jump Game 116
    • Jump Game II 117
    • Maximum Product Subarray 191
    • Wildcard Matching 192
    • Decode Ways 512
    • Regular Expression Matching 154
    • Longest Valid Parentheses 32(LeetCode)
  • Search\/Recursion\/Backtracking
    • Divide and Conquer
      • Fast Power 140
      • Median of two Sorted Arrays 65
      • Maximum Depth of Binary Tree 97
      • Balanced Binary Tree 93
      • Pow(x, n) 428
      • Find Minimum in Rotated Sorted Array II 160
      • Merge k Sorted Lists 104
    • DFS
      • Nested List Weight Sum 551
      • Route Between Two Nodes in Graph 176
    • Recursion
      • Print Numbers by Recursion 371
      • Restore IP Addresses 426
      • Generate Parentheses 427
      • Letter Combinations of a Phone Number 425
    • Backtracking
      • Word Search 123
      • Word Ladder II 121
      • Combination Sum 135
      • Combination Sum II 153
      • Combinations 152
    • Binary Search
      • Search in Rotated Sorted Array 62
      • Search in Rotated Sorted Array II 63
      • Search for a Range 61
      • Search Insert Position 60
    • BFS
      • Word Ladder 120
      • Number of Islands 433
  • Data Structure
    • Tree
      • Heap
        • Top k largest numbers II 545
        • Kth Smallest Number in Sorted Matrix 401
        • Super Ugly Number 518
        • Kth Largest in N Arrays 543
        • Kth Smallest Sum In Two Sorted Arrays 465
        • Trapping Rain Water II 364
        • Building Outline 131
        • Sliding Window Median 360
      • Priority Queue
        • Ugly Number II 4
        • Data Stream Median 81
      • Trie
        • Word Search II 132
        • Implement Trie 442
        • Add and Search Word 473
      • Binary Tree
        • Subtree 245
        • Flatten Binary Tree to Linked List 453
        • Binary Tree Paths 480
        • Binary Tree Maximum Path Sum II 475
      • Union Find
        • Graph Valid Tree 178
        • Surrounded Regions 477
        • Number of Islands 433
        • Find the Connected Component in the Undirected Graph 431
        • Find the Weak Connected Component in the Directed Graph 432
        • Number of Islands II 434
      • Binary Search Tree
        • Validate Binary Search Tree 95
        • Insert Node in a Binary Search Tree 85
        • Search Range in Binary Search Tree 11
        • Binary Search Tree Iterator 86
        • Remove Node in Binary Search Tree 87
        • Inorder Successor in BST
      • Segment Tree
        • Segment Tree Build 201
        • Segment Tree Build II 439
        • Segment Tree Query 202
        • Segment Tree Query II 247
        • Segment Tree Modify 203
        • Interval Minimum Number 205
        • Interval Sum 206
        • Interval Sum II 207
        • Count of Smaller Number before itself 249
    • Linear
      • Array
        • Median 80
        • Remove Duplicates from Sorted Array 100
        • Merge Intervals 156
        • First Missing Positive 189
        • Partition Array by Odd and Even 373
        • Trapping Rain Water 363
        • Move Zeroes 539
        • Spiral Matrix 374
        • Spiral Matrix II 381
        • Plus One 407
        • Container With Most Water 383
        • The Smallest Difference 387
        • Permutation Sequence 388
        • Number of Airplanes in the Sky 391
        • Minimum Size Subarray Sum 406
        • Wiggle Sort 508
        • Reverse Pairs 532
        • Load Balancer 526
        • Candy 412
        • Merge k sorted Arrays 486
        • Continuous Subarray Sum 402
        • Continuous Subarray Sum II 403
        • Largest Rectangle in Histogram 122
        • Rotate Array (LeetCode) 189
      • Linked List
        • Swap Two Nodes in Linked List 511
        • Intersection of Two Linked Lists 380
        • Reverse Nodes in k-Group 450
      • Stack
        • Flatten Nested List Iterator 528
        • Valid Parentheses 423
        • Evaluate Reverse Polish Notation 424
        • Simplify Path 421
        • Max Tree 126
        • Expression Tree Build 367
        • Mock Hanoi Tower by Stacks 227
      • Hash Table
        • Happy Number 488
        • Intersection of Two Arrays 547
        • Intersection of Two Arrays II 548
        • Minimum Window Substring 32
        • Max Points on a Line 186
        • Longest Substring Without Repeating Characters 384
        • Substring with Concatenation of All Words 30(LeetCode)
        • Group Anagrams 49 (LeetCode)
        • Contains Duplicate (LeetCode) 217
        • Contains Duplicate II (LetCode) 219
        • Contains Duplicate III (LeetCode) 220
      • Deque
        • Sliding Window Maximum 362
      • Matrix
        • Matrix Zigzag Traversal 185
        • Valid Sudoku 389
        • Rotate Image 161
        • Search a 2D Matrix II 38
        • Set Matrix Zeroes 162
        • Sliding Window Matrix Maximum 558
        • Submatrix Sum 405
        • Find Peak Element II 390
        • Sudoku Solver 37 (LeetCode)
    • Max Tree 126
    • Top K Frequent Words 471
    • Implement Stack 495
    • Implement stack by two queues 494
    • Implement Queue by Linked List II 493
    • Implement Queue by Linked List 492
    • Stack Sorting 229
    • Animal Shelter 230
    • LFU Chache 24
    • LRU Cache 134
  • Graph & Search
    • Clone Graph 137
    • Copy List with Random Pointer 105
    • Topological Sorting 127
    • Permutations 15
    • Permutations 16
    • Subsets 17
    • Subsets II 18
    • N-Queens 33
    • N-Queens II 34
    • Palindrome Partitioning 136
    • String Permutation II 10
    • k Sum II 90
  • Two Pointers
    • Two Sum II 443
    • Remove Element 172
    • Triangle Count 382
    • Valid Palindrome 415
    • Linked List Cycle II 103
    • Longest Substring with At Most K Distinct Characters 386
    • Subarray Sum II 404
    • 4 Sum
    • Remove Nth Node From End of List 174
  • Sort
    • Quick Sort
      • Nuts & Bolts Problem 399
      • Kth Largest Element 5
      • Wiggle Sort II 507
    • Largest Number 184
    • Sort Integers II 464
  • Bit Manipulation
    • A + B Problem 1
    • Count 1 in Binary 365
    • O(1) Check Power of 2 142
    • Flip Bits 181
    • Update Bits 179
    • Binary Representation 180
    • Divide Two Integers 414
    • Gray Code 411
    • Bitwise AND of Numbers Range (LeetCode) 201
  • Permutation
    • Permutation Index 197
    • Permutation Index II 198
    • Next Permutation 52
    • Next Permutation II 190
    • Previous Permutation 51
  • Greedy
    • Delete Digits 182
    • Find the Missing Number 196
    • Gas Station 187
  • String
    • Roman to Integer 419
    • Integer to Roman 418
    • Length of Last Word 422
    • Space Replacement 212
    • Two Strings Are Anagrams 158
    • String to Integer (Leetcode 8)
    • strStr 13
    • Multiply Strings 43 (LeetCode)
  • Enumeration
    • Digit Counts 3
    • Longest Common Prefix 78
    • Longest Words 133
    • Fizz Buzz 9
  • Mathematics
    • Ugly Number 517
    • ZigZag Conversion (LeetCode 6)
    • Palindrome Number (Leetcode 9)
    • Count Primes (LeetCode) 204
    • Rectangle Area (LeetCode) 223
  • Others
    • Google
      • Zigzag Iterator 540
      • Zigzag Iterator II 541
      • Insert Interval 30
    • FaceBook
      • Add Binary 408
      • Count and Say 420
    • No Tag
      • Left Pad 524
      • Reverse Integer 413
      • Cosine Similarity 445
      • Word Count (Map Reduce) 499
      • Product of Array Exclude Itself 50
      • Shape Factory 497
      • Toy Factory 496
      • Singleton 204
  • 其他问题
    • Use Dynamic Circulate Array to Implement Deque
    • Random Generator
    • Array Monotonic
  • 待解决
Powered by GitBook

Segment Tree

Segment Tree

区间树

https://en.wikipedia.org/wiki/Segment_tree

http://www.cnblogs.com/tanky_woo/archive/2010/09/25/1834523.html

results matching ""

    No results matching ""