Google India phone screen | L4 | reject | oct 2024
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-10-25Added By Anonymous
Source: Link
Company: Google
Role: L4
Interview Stage: Phone Screen
Location: India
Year: 2024
Original Post Content:
How to solve it efficiently
Create a bit string composed of 0s and 1s that has exactly n distinct subsequences.
A subsequence is formed by deleting some characters from the string without changing the order of the remaining characters. For example, in the bit string "101", the distinct subsequences include 0, 1, 01, 10, 11, and 101.
Find the minimum length bit string that satisfies this condition.
Input: n = 6
Output: "101"
multiple answers possible.