Find the Best Profit from One Stock Trade

Read the full interview experience this question came from →

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

Oracle logo
Oracle
Aug 10, 2026
mediumBackend EngineerOnsiteCoding & Algorithms
2
0
Practice
Loading...