1803. Count Pairs With XOR in a Range
Blog Given a (0-indexed) integer array nums and two integers low and high , return the number of nice pairs . A nice pair is a pair (i, j) where 0 and low . Example: 1 Input: nums = [1,4,2,7], low = 2, high = 6 Output: 6 Example: 2 Input: nums = [9,8,4,2,1], low = 5, high = 14 Output: 8 Constraints: 1 1 1 Data structure required for solving this problem: To solve this problem we need a data structure called trie. Steps required to solve the problem: First we will add i - 1 elem...