Loading interview...
The Trade Signal
A easy Python mock interview question on DataDriven. Practice with AI-powered feedback, real code execution, and a hire/no-hire decision.
- Domain
- Python
- Difficulty
- easy
- Seniority
- mid
Interview Prompt
The analytics team tracks a metric that fluctuates daily and wants to find the single best window where a buy-low-sell-high strategy would have yielded maximum gain. They need the gain amount and the exact day indices. Write a function that scans a list of daily values and returns the maximum possible profit from one buy and one later sell, along with the buy and sell indices.
How This Interview Works
- Read the vague prompt (just like a real interview)
- Ask clarifying questions to the AI interviewer
- Write your python solution with real code execution
- Get instant feedback and a hire/no-hire decision