Please enter your email address or userHandle.
Given an integer N, the task is to find the number of binary strings of size 2*N in which each prefix of the string has more than or an equal number of 1's than 0's.
Note: The answer can be very large. So, output answer modulo 109+7
Input: N = 2
Explanation: 1100, 1010 are two
such strings of size 4
Input: N = 3
Explanation: 111000 101100 101010 110010
110100 are such 5 strings
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.