HSBC Coding Round |Maximize Three-Digit Integer | Blog Sign Letters | Greedy Algorithms & String Frequency Maps | Feb 2nd Slot | Recent Online Assessment 2026
HSBC · Question · Posted Mar 2026
Problem1: Maximize Three-Digit Integer Problem Statement: Write a function solution that, given a three-digit integer N and an integer K, returns the maximum possible three-digit value that can be obtained by performing at most K increases by 1 of any digit in N. Examples: Given N = 512 and K = 10, the function should return 972. The result can be obtained by increasing the first digit of N four times and the second digit six times. Given N = ...
The full answer & interview discussion are available to premium members.
Log in Create a free account