Bitwise XOR Subsequences
Asked at Goldman Sachs · Coding & Leetcode-style Questions · Difficulty: Medium
A subsequence of an array is formed by removing zero or more elements from an array without changing the order of the remaining elements. In a valid subsequence, each pair of adjacent elements of the subsequence has bitwise XOR equal to `k`. Note that any subsequence of length `1` is valid regardless of the value of `k`, because there is no pair of adjacent elements in such a subsequence.
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