Maximize Stock Trading Profits Using Dynamic Programming
Company: Citadel
Role: Data Scientist
Category: Coding & Algorithms
Difficulty: Medium
Interview Round: Technical Screen
##### Scenario
Evaluating dynamic-programming skills on stock-trading profits.
##### Question
Given an array of daily stock prices and an integer K, write Python code that returns the maximum profit obtainable with at most K buy-sell transactions.
##### Hints
Describe and implement a bottom-up DP running in O(K·N) time and O(N) space.
Quick Answer: This question evaluates proficiency in dynamic programming, state modeling for sequential decision problems, and algorithmic optimization related to constrained transaction planning.