Tap here to switch tabs
Problem
Submissions

Problem: Longest Strictly Increasing Subsequence, Non-Zero AND

Try to solve the Longest Strictly Increasing Subsequence With Non-Zero Bitwise AND problem.

Statement

Given an integer array nums, return the length of the longest strictly increasing subsequence of nums such that the bitwise AND of all elements in the subsequence is strictly greater than 00.

If no such subsequence exists, return 00.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 0≤0 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Strictly Increasing Subsequence, Non-Zero AND

Try to solve the Longest Strictly Increasing Subsequence With Non-Zero Bitwise AND problem.

Statement

Given an integer array nums, return the length of the longest strictly increasing subsequence of nums such that the bitwise AND of all elements in the subsequence is strictly greater than 00.

If no such subsequence exists, return 00.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 0≤0 \leq nums[i] ≤109\leq 10^9