← Salesforce questions
CodingReported in a candidate post, Jan 2025

Count subsequences of a large digit string divisible by 4

Filed under Salesforce

Given a decimal number as a string of up to 10^5 digits, count the subsequences (chosen by index, leading zeros allowed) whose value is divisible by 4. Return the count modulo 10^9 + 7.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Salesforce questions

Collected from public candidate posts and coding forums. Updated Nov 2026.