Showing 3 of 4 questions
Determine how many subsequences of a given binary string satisfy a specific condition based on the number of set bits. You need to count only the subsequences whose decimal value equals a power of 2.
#1. Count the Number of Good Subsequences
Given an array of numbers, calculate the sum of absolute distances between all pairs of identical elements. Return the result as an array where each position corresponds to the total distance for that element.
#2. Intervals Between Identical Elements
You are given a set of statements about other people being good or bad. Determine the maximum number of people who can be 'good' while ensuring all the statements are consistent and truthful from the perspective of the good people.
#3. Maximum Good People Based on Statements
Page 1 of 1 · 4 total