Google India phone screen | L4 | reject | oct 2024

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2024-10-25Added By Anonymous
Source:Ā Link
🧭 Experience: unknown
āœ… Outcome: reject
šŸ’° Compensation: unknown
šŸ“ Location: India
šŸ¢ Company: Google
šŸŽ“ Education: unknown
šŸŽ Benefits: unknown
šŸ“… Offer Date: Oct 2024

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.
Comments