Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Max Profit Single Transaction

Medium
Behavioral & Leadershipalgorithmic thinkingtechnical experiencequantitative problem solvingAsked 1 times

Problem

Given an array of historical stock prices, write an efficient algorithm to find the maximum profit you could achieve from a single buy-and-sell transaction.

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
Morningstar Data Scientist Interview Questions
Next questions
IntegraFECMax Profit Single TradeEasyLoftMax Profit From One TransactionEasyHopperMax Profit From One TransactionMedium
0 / ~200 words