Morgan Stanley OA 2021 | Backtracking & Custom Comparators | On-campus
Morgan-Stanley · Question · Posted Jun 2026
Question 1: Express as Power Sum Problem Statement Given an integer N, find the number of ways it can be expressed as the sum of the K-th powers of unique natural numbers. Input Format The first line of input contains T - the number of test cases. It's followed by T lines, each line containing 2 space-separated integers - N and K. Output Format Print the number of ways for each test case, separated by a new line. Constraints 1 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account