Bitwise XOR Subsequences

Asked at Goldman Sachs · Coding & Leetcode-style Questions · Difficulty: Medium

Given an array of integers and an integer k, determine the length of the longest contiguous subsequence that has a XOR result of k. The function must return the length of the longest contiguous subsequence whose XOR of all the adjacent elements equals k.

Loading the problem…