#1803
Count Pairs With XOR in a Range
candidate master · 1525 · lc hard +32 · premium · verified · 46.3% accepted · 553 likes · top 30%
Description
Given a 0-indexed integer array nums and integers low and high, return the count of nice pairs (i, j) where 0 <= i < j < nums.length and low <= (nums[i] XOR nums[j]) <= high.
Code
1
2
3