← Back to problems

41. Highest So Far

BEGINNER
BeginnerLLDStateStreaming

Track the largest number seen so far in a stream and report it on request.

Read numbers as they arrive and remember the largest one seen so far. Process commands from stdin, one per line. Commands: - SEE <n> : observe the integer n. - MAX : print the largest number seen so far, or "NONE" if nothing has been seen yet.
Log in to submit a solution

Comments

Log into join the discussion.