SABRE Corporation | Off Campus OA 2024 | Maximum Value of K Coins From Piles | Dynamic Programming (Knapsack)

Question · Posted Jun 2026

Problem Statement You are given n piles of coins. Each pile is represented by an array where piles[i][j] denotes the value of the jth coin from the top of the ith pile. You can only take coins from the top of a pile. If you want to take a coin deeper in a pile, you must first take all coins above it. Your task is to pick exactly k coins in total from all piles such that the total value ...

The full answer & interview discussion are available to premium members.

Log in Create a free account