Question: ByteDance | Set-2 | Singapore | SDE | Freshers | 2nd October 2021
ByteDance · Question · Posted Oct 2021
Problem 4. Maximum product of sum components Given integers n and k, decompose n into a sum of at least 2 positive integers where each integer >= k, and maximize the product of those integers. Return the maximum product you can get. If n cannot be decomposed as required, return -1. Either way, please return it as a string. For example, if n is 8, • k = 2: 8 = 3 + 3 + 2:3*3*2 18 • k = ...
The full answer & interview discussion are available to premium members.
Log in Create a free account