leetcode 122. Best Time to Buy and Sell Stock II

Orignal question can be found here.

My solution is as follows:

int maxProfit(int* prices, int pricesSize)
  int result = 0;
  for (int i=1; i<pricesSize; ++i)

  return result;

Leave a Reply

Your email address will not be published. Required fields are marked *