Showing 3 of 3 questions
Given an array of prime numbers, find the smallest possible integer for each element such that its bitwise OR with itself plus one equals that element. If no such number exists for a given value, return a negative one.
#1. Construct the Minimum Bitwise Array I
Given an array of prime numbers, construct a minimum bitwise array such that the bitwise OR of each element and its increment equals the corresponding prime number. If no valid number can produce that value, return negative one for that position.
#2. Construct the Minimum Bitwise Array II
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#3. Number of Islands
Page 1 of 1 · 3 total