16 lines
327 B
Java
16 lines
327 B
Java
|
package array;
|
||
|
|
||
|
import org.junit.Test;
|
||
|
|
||
|
import static org.junit.Assert.*;
|
||
|
|
||
|
public class MaxSubArrayTest {
|
||
|
|
||
|
@Test
|
||
|
public void maxSubArray() {
|
||
|
MaxSubArray solution = new MaxSubArray();
|
||
|
int[] nums={-2,1,-3,4,-1,2,1,-5,4};
|
||
|
int res=solution.maxSubArray(nums);
|
||
|
System.out.println(res);
|
||
|
}
|
||
|
}
|