IBM Online Assessment (OA) Coding Questions & Solutions | HackerRank Feb2026 | Palindromic Substrings Weight | SQL Wallet Transactions | IBM Coding Round
IBM · Question · Posted Mar 2026
Question 1: Sum of Palindromic Substrings Weight Problem Statement: Given a string, find the sum of the alphabetic weight of all substrings of the string that are palindromes. Return the answer modulo (10^9 + 7). For each palindromic substring, its weight is the sum of its characters' positions in the alphabet. i.e., 'a' = 1, 'b' = 2, ..., 'z' = 26. Note: A palindrome is a string that reads the same from the first character to the last and ...
The full answer & interview discussion are available to premium members.
Log in Create a free account