Whiteboard training - how to remember the lessons learned?

I have brainstormed this problem: “given a slice of daily stock prices, you can buy, sell or keep at most one stock, determine maximum possible profit”.

Initially I confused myself into trying dynamic programming, but the superior solution is linear. I had an “aham” moment when realizing the solution was linear, and realize there is a lesson to be learned here.

My question is about learning strategy: what lesson learned by solving this problem can I write down and thus compose a large cheat sheet that will serve as quick recap material for future coding& whiteboard challenges ?

Did anyone here ever trained on such problems and took notes ? Can you give some details on what you did to formulate and remmeber the lessons learned, and not simply forget them later ?

Hi, @JOhn_Stuart, I have two questions:

  1. Do you mean this algorithm?

  2. Are you asking about literally this problem or more generally about remembering which algorithms apply to which problems?

Hi @skillian,

It is a variaton of that algorithm (infinite k).

My question is once I have solved this problem (it was not hard), how and what can I take notes so that I remember as much as possible of this ?

  • remember the solution to this problem
  • remember the thought process I had
  • remember the “AHA” moments and what helped me reach them
  • use the notes to quickly get myselfs mentally prepared for similar problems


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.