Binary Indexed Tree Problems
Master binary indexed tree problems with AI-powered solutions. Get instant coding assistance during your technical interviews for all 23 problems in this category.
Total Problems: 23
Medium: 5
Hard: 18
Showing 23 of 23 problems
Problems
Scroll within this area to browse all problems
#
Title
Difficulty
Binary Indexed Tree LeetCode Problems List
- 315. Count of Smaller Numbers After Self - Hard - Binary Indexed TreeGiven an integer array nums, return an integer array counts where counts[i] is the number of smaller elements to the right of nums[i].... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 673. Number of Longest Increasing Subsequence - Medium - Binary Indexed TreeGiven an integer array nums, return the number of longest increasing subsequences. Notice that the sequence has to be strictly increasing.... Topics: Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
- 2526. Longest Increasing Subsequence II - Hard - Binary Indexed TreeYou are given an integer array nums and an integer k. Find the longest subsequence of nums that meets the following requirements: The subsequence is s... Topics: Array, Divide and Conquer, Dynamic Programming, Binary Indexed Tree, Segment Tree, Queue, Monotonic Queue
- 218. The Skyline Problem - Hard - Binary Indexed TreeA city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Given the locations and ... Topics: Array, Divide and Conquer, Binary Indexed Tree, Segment Tree, Line Sweep, Heap (Priority Queue), Ordered Set
- 3435. Block Placement Queries - Hard - Binary Indexed TreeThere exists an infinite number line, with its origin at 0 and extending towards the positive x-axis. You are given a 2D array queries, which contains... Topics: Array, Binary Search, Binary Indexed Tree, Segment Tree
- 406. Queue Reconstruction by Height - Medium - Binary Indexed TreeYou are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order). Each people[i] = [hi, ki] rep... Topics: Array, Binary Indexed Tree, Segment Tree, Sorting
- 327. Count of Range Sum - Hard - Binary Indexed TreeGiven an integer array nums and two integers lower and upper, return the number of range sums that lie in [lower, upper] inclusive. Range sum S(i, j) ... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 3181. Find Building Where Alice and Bob Can Meet - Hard - Binary Indexed TreeYou are given a 0-indexed array heights of positive integers, where heights[i] represents the height of the ith building. If a person is in building i... Topics: Array, Binary Search, Stack, Binary Indexed Tree, Segment Tree, Heap (Priority Queue), Monotonic Stack
- 307. Range Sum Query - Mutable - Medium - Binary Indexed TreeGiven an integer array nums, handle multiple queries of the following types: Update the value of an element in nums. Calculate the sum of the elements... Topics: Array, Divide and Conquer, Design, Binary Indexed Tree, Segment Tree
- 493. Reverse Pairs - Hard - Binary Indexed TreeGiven an integer array nums, return the number of reverse pairs in the array. A reverse pair is a pair (i, j) where: 0 <= i < j < nums.length and nums... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 1356. Minimum Number of Moves to Make Palindrome - Hard - Binary Indexed TreeYou are given a string s consisting only of lowercase English letters. In one move, you can select any two adjacent characters of s and swap them. Ret... Topics: Two Pointers, String, Greedy, Binary Indexed Tree
- 3941. Number of Integers With Popcount-Depth Equal to K II - Hard - Binary Indexed TreeYou are given an integer array nums. For any positive integer x, define the following sequence: p0 = x pi+1 = popcount(pi) for all i >= 0, where popco... Topics: Array, Divide and Conquer, Binary Indexed Tree, Segment Tree
- 1772. Create Sorted Array through Instructions - Hard - Binary Indexed TreeGiven an integer array instructions, you are asked to create a sorted array from the elements in instructions. You start with an empty container nums.... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 3139. Subarrays Distinct Element Sum of Squares II - Hard - Binary Indexed TreeYou are given a 0-indexed integer array nums. The distinct count of a subarray of nums is defined as: Let nums[i..j] be a subarray of nums consisting ... Topics: Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
- 2513. Number of Pairs Satisfying Inequality - Hard - Binary Indexed TreeYou are given two 0-indexed integer arrays nums1 and nums2, each of size n, and an integer diff. Find the number of pairs (i, j) such that: 0 <= i < j... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 2765. Make Array Empty - Hard - Binary Indexed TreeYou are given an integer array nums containing distinct numbers, and you can perform the following operations until the array is empty: If the first e... Topics: Array, Binary Search, Greedy, Binary Indexed Tree, Segment Tree, Sorting, Ordered Set
- 1511. Count Number of Teams - Medium - Binary Indexed TreeThere are n soldiers standing in a line. Each soldier is assigned a unique rating value. You have to form a team of 3 soldiers amongst them under the ... Topics: Array, Dynamic Programming, Binary Indexed Tree, Segment Tree
- 3527. Alternating Groups III - Hard - Binary Indexed TreeThere are some red and blue tiles arranged circularly. You are given an array of integers colors and a 2D integers array queries. The color of tile i ... Topics: Array, Binary Indexed Tree
- 2280. Count Good Triplets in an Array - Hard - Binary Indexed TreeYou are given two 0-indexed arrays nums1 and nums2 of length n, both of which are permutations of [0, 1, ..., n - 1]. A good triplet is a set of 3 dis... Topics: Array, Binary Search, Divide and Conquer, Binary Indexed Tree, Segment Tree, Merge Sort, Ordered Set
- 1629. Minimum Possible Integer After at Most K Adjacent Swaps On Digits - Hard - Binary Indexed TreeYou are given a string num representing the digits of a very large integer and an integer k. You are allowed to swap any two adjacent digits of the in... Topics: String, Greedy, Binary Indexed Tree, Segment Tree
- 3829. Shortest Path in a Weighted Tree - Hard - Binary Indexed TreeYou are given an integer n and an undirected, weighted tree rooted at node 1 with n nodes numbered from 1 to n. This is represented by a 2D array edge... Topics: Array, Tree, Depth-First Search, Binary Indexed Tree, Segment Tree
- 2380. Booking Concert Tickets in Groups - Hard - Binary Indexed TreeA concert hall has n rows numbered from 0 to n - 1, each with m seats, numbered from 0 to m - 1. You need to design a ticketing system that can alloca... Topics: Binary Search, Design, Binary Indexed Tree, Segment Tree
- 2333. Count Number of Rectangles Containing Each Point - Medium - Binary Indexed TreeYou are given a 2D integer array rectangles where rectangles[i] = [li, hi] indicates that ith rectangle has a length of li and a height of hi. You are... Topics: Array, Hash Table, Binary Search, Binary Indexed Tree, Sorting
Related LeetCode Topics
- Array LeetCode Problems
- Backtracking LeetCode Problems
- Biconnected Component LeetCode Problems
- Binary Search LeetCode Problems
- Binary Search Tree LeetCode Problems
- Binary Tree LeetCode Problems
- Bit Manipulation LeetCode Problems
- Bitmask LeetCode Problems
- Brainteaser LeetCode Problems
- Breadth-First Search LeetCode Problems
- Bucket Sort LeetCode Problems
- Combinatorics LeetCode Problems
- Concurrency LeetCode Problems
- Counting LeetCode Problems
- Counting Sort LeetCode Problems
- Data Stream LeetCode Problems
- Database LeetCode Problems
- Depth-First Search LeetCode Problems
- Design LeetCode Problems
- Divide and Conquer LeetCode Problems