JP Morgan | Software Engineer | Coding | Online Assessment

KHKhagendra01·
Interview date

January 22, 2026

Company

JP Morgan

Role

Software Engineer

Level

Unspecified

Region

Unspecified

Round type

Coding

Team/Org

General Hire

Stage

Online Assessment

You are given a binary string (containing only '0' and '1').Your task is to count how many substrings satisfy both conditions:The substring contains an equal number of 0s and 1s, andAll 0s and all 1s inside the substring are grouped consecutively — that is, it must look like:all 0s followed by all 1s (e.g., "0011"), orall 1s followed by all 0s (e.g., "1100").Every valid occurrence is counted, even if the substring va...

Sign in to view the full interview experience

Create or use your InterviewDB account to read the full Warren post and all shared details.

Sign in to continue