← All problemsSign in

StringIEEE

You are given a binary string of length n. IEEE is interested in sub strings which have equal number of 0's and 1's. Help IEEE compute the length of the largest sub-string of the given string, which has equal number of 0's and 1's. ### INPUT The first line has t, the number of test cases. First line of each test case is n and the next line is a binary string of length n. ### OUTPUT

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start