Paytm FTE, Recently Asked Online Assessments in 2026 | Distinct Goodness Values
Paytm · Question · Posted Apr 2026
Distinct Goodness Values Problem Statement: (Note: The exact definition of goodness is partially cut off, but it involves calculating a value based on strictly increasing subsequences). ...There are no other strictly increasing subsequences that yield a different goodness value. So, the answer is [0, 1, 2, 4, 6], which is sorted in non-decreasing order. Function Description Complete the function getDistinctGoodnessValues in the editor below. getDistinctGoodnessValues has the following parameter: int arr[n]: an array of integers Returns int[]: all possible distinct ...
The full answer & interview discussion are available to premium members.
Log in Create a free account