โ† HSBC questions

Sum of odd position digits in a number based on parity

Filed under HSBC

Given a number N and a parity indicator x, sum the digits at odd positions in N. If x is even, use 1-based indexing; if x is odd, use 0-based indexing.

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 HSBC questions

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