Skip to content

Latest commit

 

History

History

20200905 - stocks - ruby

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Em Video

Voce pode assistir a esta sessão em:

Problem

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note: You cannot sell a stock before you buy one Example Input: [7, 1, 5, 3, 6, 4] Output: 5 Explanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5. Not 7-1 = 6, as the selling price needs to be larger than buying price.

Participants

  1. Cláudio Berrondo (Rio de Janeiro)
  2. Daniel Drumond (Florianópolis)
  3. Cássio Augusto (Rio de Janeiro)
  4. Celestino Gomes (Rio de Janeiro)
  5. Leo (Belém)

Retrospective

😀

  • Ruby, Ruby, Ruby!!!
  • Nice challenge
  • English 8D
  • We had no knock knock jokes today-

😩

  • Repl.it frozen many times today. (missing the hacker account...)
  • 8x8 too :(
  • Some communication problems (some?)
  • Nobody talking during the retrospective :(
  • My environment a lot noise (Tino)
  • I think we must respect more the dojo rules... (You think?) (+)
  • We ignored the dojo rules:
    • Red talk
    • Green talk
    • Yellow talk
    • Talk, talk, talk
  • We had only Brazilians

🤫

  • tmux?
  • Discord? (+OBS)
  • Meet + OBS?
  • vscode?
  • C next week?