MCPcopy Create free account
hub / github.com/Blankj/awesome-java-leetcode / maxSubArray

Method maxSubArray

src/com/blankj/easy/_0053/Solution.java:20–22  ·  view source on GitHub ↗
(int[] nums)

Source from the content-addressed store, hash-verified

18// return max;
19// }
20 public int maxSubArray(int[] nums) {
21 return helper(nums, 0, nums.length - 1);
22 }
23
24 private int helper(int[] nums, int left, int right) {
25 if (left >= right) return nums[left];

Callers 1

mainMethod · 0.95

Calls 1

helperMethod · 0.95

Tested by

no test coverage detected