JUSPAY Hiring | Problem Count Ways to Build Good Strings | On-Campus OA (2023)

Juspay · Question · Posted Jun 2026

Problem Statement You are given four integers: low high zero one Initially, you start with an empty string. At each step, you can perform one of the following operations: Append a block of zero zeros ('0' characters). Append a block of one ones ('1' characters). A string is considered good if its length lies between low and high (inclusive). Your task is to count the total number of different good strings that can be constructed. Since the answer can be ...

The full answer & interview discussion are available to premium members.

Log in Create a free account