1442. Count Triplets That Can Form Two Arrays of Equal XOR
Description
Input: arr = [2,3,1,6,7]
Output: 4
Explanation: The triplets are (0,1,2), (0,2,2), (2,3,4) and (2,4,4)Input: arr = [1,1,1,1,1]
Output: 10Tags
Solution
Solution 1:
Solution 2:
Complexity
Solution 1:
Solution 2:
Code
Solution 1:
Solution 2:
Reference
Previous1332. Remove Palindromic SubsequencesNext1460. Make Two Arrays Equal by Reversing Sub-arrays
Last updated