Available question text
Given a permutation of 1..n, count how many distinct values can be formed as nums[i] XOR nums[j] XOR nums[k] with i <= j <= k (so repeats allowed). With n up to 1e5, the challenge is to compute the size of this set efficiently by exploiting bitwise/XOR properties and combinatorial structure rather than brute force.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3513. Number of Unique XOR Triplets I
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source