Yahoo logoYahoo
CodingMembers

Stock Trade Ledger: Compute Realized Profit per Sale

Members only

A finance-flavored coding question: given a user's chronological buy and sell history across several stocks, report how much profit or loss each sale actually locked in. It rewards clean bookkeeping over clever tricks, and partial sales are where most attempts break.

SWE
queue
hashmap
simulation
medium
Frequency
Single report
Last asked
—
Stage
tech-screen

Members get

  • Full problem statement
  • 3 progressive hints
  • Step-by-step approach
  • Full solution with code
  • 3 common pitfalls
  • 6 talking points
  • 5 follow-up questions with answer directions
  • Preparation drills

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...