Merge branch 'master' of https://github.com/sebx59/tutorials
This commit is contained in:
commit
b97f548bb5
algorithms-modules/algorithms-miscellaneous-5/src
main/java/com/baeldung/algorithms/maximumsubarray
test/java/com/baeldung/algorithms/maximumsubarray
apache-cxf-modules
README.md
cxf-aegis
cxf-introduction
README.mdpom.xml
src
main
java/com/baeldung/cxf/introduction
Baeldung.javaBaeldungImpl.javaServer.javaStudent.javaStudentAdapter.javaStudentImpl.javaStudentMap.javaStudentMapAdapter.java
resources
test/java/com/baeldung/cxf/introduction
cxf-jaxrs-implementation
README.mdpom.xml
src
main
java/com/baeldung/cxf/jaxrs/implementation
resources
test/java/com/baeldung/cxf/jaxrs/implementation
cxf-spring
.gitignoreREADME.mdpom.xml
pom.xmlsrc
main
java/com/baeldung/cxf/spring
AppInitializer.javaBaeldung.javaBaeldungImpl.javaClientConfiguration.javaServiceConfiguration.javaStudent.java
resources
test/java/com/baeldung/cxf/spring
sse-jaxrs
core-groovy-modules
core-groovy-2
README.mdgmavenplus-pom.xmlpom.xml
src
main
groovy/com/baeldung
java/com/baeldung
resources
test
groovy/com/baeldung
category
concatenate
defkeyword
determinedatatype
metaprogramming
strings
templateengine
webservice
xml
resources/com/baeldung/xml
core-groovy-collections
@ -14,7 +14,7 @@ public class KadaneAlgorithm {
|
||||
int end = 0;
|
||||
|
||||
int maxSoFar = arr[0], maxEndingHere = arr[0];
|
||||
for (int i = 0; i < size; i++) {
|
||||
for (int i = 1; i < size; i++) {
|
||||
|
||||
if (arr[i] > maxEndingHere + arr[i]) {
|
||||
start = i;
|
||||
|
@ -27,4 +27,16 @@ class KadaneAlgorithmUnitTest {
|
||||
//then
|
||||
assertEquals(-1, maxSum);
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenArrayWithAllPosiitveNumbersWhenMaximumSubarrayThenReturnsExpectedResult() {
|
||||
//given
|
||||
int[] arr = new int[] {4, 1, 3, 2};
|
||||
//when
|
||||
KadaneAlgorithm algorithm = new KadaneAlgorithm();
|
||||
int maxSum = algorithm.maxSubArraySum(arr);
|
||||
//then
|
||||
assertEquals(10, maxSum);
|
||||
}
|
||||
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -3,7 +3,7 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>apache-cxf</name>
|
||||
<packaging>pom</packaging>
|
@ -9,7 +9,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>apache-cxf</artifactId>
|
||||
<artifactId>apache-cxf-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>core-groovy-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>core-groovy-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<artifactId>core-groovy-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user