NeetCode #874LC-3133MediumBit ManipulationNC 250
← Back to All Problems

#874 · #3133 · Minimum Array End(数组最后一个元素的最小值)

📌 Problem Statement & Constraints

Given two integers n and x, build an array nums of n positive integers such that nums is strictly increasing and the bitwise AND of all its elements equals x. Return the minimum possible value of nums[n - 1]. Constraints: 1 <= n, x <= 10^8.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!