#3825
Longest Strictly Increasing Subsequence With Non-Zero Bitwise AND
medium · 50.7% accepted · 98 likes · top 39%
array · binary search · bit manipulation · enumeration
Description
You are given an integer array nums.
Return the length of the longest strictly increasing subsequence in nums whose bitwise AND is non-zero. If no such subsequence exists, return 0.
Solution