Quick Overview

Given daily stock prices, return the largest profit obtainable from at most one purchase followed by one later sale, or zero when no profitable trade exists.

Find the Best Profit from One Stock Trade

Company: Oracle

Role: Backend Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Given daily stock prices, return the largest profit obtainable from at most one purchase followed by one later sale, or zero when no profitable trade exists.

Read the full Oracle Backend Engineer interview experience this question came from

Loading…