โ† HSBC questions

Compare string weights based on character positions/ASCII values

Filed under HSBC

Calculate the weight of two strings by summing the ASCII values of their characters. Return the weight of the heavier string, or -1 if equal.

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.