best-time-to-buy-and-sell-stock 1.0.0
Best Time to Buy and Sell Stock
Loading...
Searching...
No Matches
main.cpp File Reference
#include <iostream>
#include <vector>
Include dependency graph for main.cpp:

Go to the source code of this file.

Data Structures

class  Solution
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 27 of file main.cpp.

28{
29 // vector<int> prices = { 7, 1, 5, 3, 6, 4 };
30 vector<int> prices = { 2, 1, 4 };
31 Solution sol;
32 cout << "output: " << sol.maxProfit(prices) << endl;
33 return 0;
34}
int maxProfit(vector< int > &prices)
Definition main.cpp:9

References Solution::maxProfit().