1 machine-learning interview question on coding.
You are given an integer array prices where prices i is the price of a given stock on the i-th day, and an integer k .…