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…
More Goldman Sachs interview questions
- Merge K Sorted Lists (including K=3)
- Goldman Hirevue Behavioral Bank (6 Questions)
- Goldman Sachs HireVue Behavioral and Recursion
- Probability and Statistics Drill: Eight Numeric Problems
- Explain Recursion to a Non-CS Audience
- Implement a Deque From Scratch