In O(n), pretty simple: public static Profit bestProfit(int[] a, int begin, int end) { Profit bestProfit = new Profit(); int min = a[begin]; ... ... <看更多>
Search
Search
In O(n), pretty simple: public static Profit bestProfit(int[] a, int begin, int end) { Profit bestProfit = new Profit(); int min = a[begin]; ... ... <看更多>
Create an account or log in to Facebook. Connect with friends, family and other people you know. Share photos and videos, send messages and get updates. ... <看更多>