HenLiHai

Keep the faith

Wednesday, June 14, 2017

[Leetcode]Best Time to Buy and Sell Stock 1


https://leetcode.com/problems/best-time-to-buy-and-sell-stock/#/description
The idea here is keep a currMin and iterate through whole prices list. Through each iteration, we update currMin and currMaxProfit
Posted by Unknown at 6:37 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Bloomberg, Leetcode

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2018 (1)
    • ►  January (1)
      • ►  Jan 20 (1)
  • ▼  2017 (31)
    • ►  December (2)
      • ►  Dec 31 (1)
      • ►  Dec 27 (1)
    • ►  August (12)
      • ►  Aug 17 (6)
      • ►  Aug 16 (6)
    • ►  July (5)
      • ►  Jul 12 (1)
      • ►  Jul 05 (3)
      • ►  Jul 04 (1)
    • ▼  June (12)
      • ►  Jun 27 (2)
      • ►  Jun 25 (4)
      • ▼  Jun 14 (2)
        • Dairy
        • [Leetcode]Best Time to Buy and Sell Stock 1
      • ►  Jun 13 (4)
  • ►  2015 (2)
    • ►  January (2)
      • ►  Jan 09 (2)
  • ►  2014 (1)
    • ►  December (1)
      • ►  Dec 22 (1)

Labels

  • big_data
  • Bloomberg
  • interview
  • Leetcode
  • Linkedlist
  • microsoft
  • needwork
  • python
  • sort
Simple theme. Powered by Blogger.