update the source from root pom and compile project
This commit is contained in:
parent
aeafc6f848
commit
8ff8f39e4e
5
.idea/compiler.xml
generated
5
.idea/compiler.xml
generated
@ -6,16 +6,21 @@
|
|||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="codebank" />
|
||||||
<module name="cwiki-us-demo-tutorials" />
|
<module name="cwiki-us-demo-tutorials" />
|
||||||
|
<module name="discourse" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
<bytecodeTargetLevel target="1.8">
|
<bytecodeTargetLevel target="1.8">
|
||||||
|
<module name="codebank" target="11" />
|
||||||
<module name="cwiki-us-demo-tutorials" target="11" />
|
<module name="cwiki-us-demo-tutorials" target="11" />
|
||||||
<module name="cwiki-us-demo-tutorials.spring-batch" target="11" />
|
<module name="cwiki-us-demo-tutorials.spring-batch" target="11" />
|
||||||
<module name="cwiki-us-demo-tutorials.spring-batch.main" target="11" />
|
<module name="cwiki-us-demo-tutorials.spring-batch.main" target="11" />
|
||||||
<module name="cwiki-us-demo-tutorials.spring-batch.test" target="11" />
|
<module name="cwiki-us-demo-tutorials.spring-batch.test" target="11" />
|
||||||
|
<module name="discourse" target="11" />
|
||||||
<module name="lang-tutorial" target="1.5" />
|
<module name="lang-tutorial" target="1.5" />
|
||||||
<module name="parent-modules" target="11" />
|
<module name="parent-modules" target="11" />
|
||||||
|
<module name="toolkits" target="1.5" />
|
||||||
</bytecodeTargetLevel>
|
</bytecodeTargetLevel>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
2
.idea/encodings.xml
generated
2
.idea/encodings.xml
generated
@ -3,5 +3,7 @@
|
|||||||
<component name="Encoding">
|
<component name="Encoding">
|
||||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/toolkits/codebank/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/toolkits/discourse/src/main/java" charset="UTF-8" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
5
.idea/misc.xml
generated
5
.idea/misc.xml
generated
@ -6,6 +6,11 @@
|
|||||||
<option value="$PROJECT_DIR$/pom.xml" />
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
|
<option name="ignoredFiles">
|
||||||
|
<set>
|
||||||
|
<option value="$PROJECT_DIR$/toolkits/pom.xml" />
|
||||||
|
</set>
|
||||||
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
3
.idea/modules.xml
generated
3
.idea/modules.xml
generated
@ -2,13 +2,16 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectModuleManager">
|
<component name="ProjectModuleManager">
|
||||||
<modules>
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/toolkits/codebank/codebank.iml" filepath="$PROJECT_DIR$/toolkits/codebank/codebank.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.main.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.main.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.main.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.main.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.main.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.main.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.main.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.main.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.test.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.test.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.test.iml" filepath="$PROJECT_DIR$/.idea/modules/spring-batch/cwiki-us-demo-tutorials.spring-batch.test.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.test.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.test.iml" />
|
<module fileurl="file://$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.test.iml" filepath="$PROJECT_DIR$/.idea/modules/cwiki-us-demo-tutorials.test.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/toolkits/discourse/discourse.iml" filepath="$PROJECT_DIR$/toolkits/discourse/discourse.iml" />
|
||||||
<module fileurl="file://$PROJECT_DIR$/parent-modules.iml" filepath="$PROJECT_DIR$/parent-modules.iml" />
|
<module fileurl="file://$PROJECT_DIR$/parent-modules.iml" filepath="$PROJECT_DIR$/parent-modules.iml" />
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/toolkits/toolkits.iml" filepath="$PROJECT_DIR$/toolkits/toolkits.iml" />
|
||||||
</modules>
|
</modules>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
122
.idea/workspace.xml
generated
122
.idea/workspace.xml
generated
@ -4,52 +4,41 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="bc4dcfec-3698-4fde-a6cf-dd08b73f1f06" name="Default Changelist" comment="Update pom file for downloading from central maven repo">
|
<list default="true" id="bc4dcfec-3698-4fde-a6cf-dd08b73f1f06" name="Default Changelist" comment="Change name and description">
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/models/ListNode.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/models/TreeNode.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/KayakCountUpDown.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/KayakRobotMovement.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/ManNextFibonacciNumber.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/models/ListNode.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/VariableTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/models/TreeNode.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/codility/CodilityBinaryGapTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/usecases/VarargsCase.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/common/usecase/VarargsCase.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0007SerializeAndDeserializeTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithml/utils/TreeUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/common/utils/TreeUtils.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0069LevelOrderTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/KayakCountUpDown.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/common/interview/KayakCountUpDown.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0102HasCycleTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/KayakRobotMovement.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/common/interview/KayakRobotMovement.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0165MergeTwoListsTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/interview/ManNextFibonacciNumber.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/main/java/com/ossez/toolkits/codebank/common/interview/ManNextFibonacciNumber.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0425LetterCombinationsTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/BitOperationTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/BitOperationTest.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0433NumIslandsTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/LintcodeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/LintcodeTest.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode1480DotProductTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/SingletonTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/SingletonTest.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/AmazonTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/TreeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/TreeTest.java" afterDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/KayakTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/codility/CodilityBinaryGapTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/MassMutual.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0007SerializeAndDeserializeTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/PillPackTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0069LevelOrderTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/TennaTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0102HasCycleTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/WayfairTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0165MergeTwoListsTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/others/LambdaEvensTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0425LetterCombinationsTest.java" beforeDir="false" />
|
||||||
<change afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/others/MinimumCoinsTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode0433NumIslandsTest.java" beforeDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/lintcode/LintCode1480DotProductTest.java" beforeDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/readme.md" beforeDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/AmazonTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/AmazonTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/Main.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/KayakTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/KayakTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/models/ListNode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/models/ListNode.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/MassMutual.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/MassMutual.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/models/TreeNode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/models/TreeNode.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/PillPackTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/PillPackTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/objplusclass/CreateObject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/objplusclass/CreateObject.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/TennaTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/TennaTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/overview/FreshJuiceEnums.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/overview/FreshJuiceEnums.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/WayfairTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/WayfairTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/overview/HelloWorld.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/overview/HelloWorld.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/others/LambdaEvensTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/LambdaEvensTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/usecases/VarargsCase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithm/usecases/VarargsCase.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/interview/tests/others/MinimumCoinsTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/interview/MinimumCoinsTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ossez/lang/tutorial/utils/TreeUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ossez/codebank/algorithml/utils/TreeUtils.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/toolkits/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/.idea/compiler.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/BitOperationTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/BitOperationTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/VariableTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/codebank/src/test/java/com/ossez/toolkits/codebank/tests/VariableTest.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/LintcodeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/LintcodeTest.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/toolkits/discourse/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/toolkits/discourse/pom.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/SingletonTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/SingletonTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/TreeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/codebank/algorithm/tests/TreeTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/VariableTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/VariableTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/codility/CodilityBinaryGapTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/codility/CodilityBinaryGapTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0007SerializeAndDeserializeTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0007SerializeAndDeserializeTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0069LevelOrderTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0069LevelOrderTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0102HasCycleTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0102HasCycleTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0165MergeTwoListsTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0165MergeTwoListsTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0425LetterCombinationsTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0425LetterCombinationsTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0433NumIslandsTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode0433NumIslandsTest.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode1480DotProductTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/ossez/lang/tutorial/tests/lintcode/LintCode1480DotProductTest.java" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -110,7 +99,7 @@
|
|||||||
<recent name="C:\WorkDir\GitHub\cwiki-us-docs\java-tutorials\src\test\java\com\ossez\lang\tutorial\tests" />
|
<recent name="C:\WorkDir\GitHub\cwiki-us-docs\java-tutorials\src\test\java\com\ossez\lang\tutorial\tests" />
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager">
|
<component name="RunManager" selected="JUnit.WayfairTest.testBuildCastles">
|
||||||
<configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
|
<configuration default="true" type="ArquillianTestNG" factoryName="" nameIsGenerated="true">
|
||||||
<option name="arquillianRunConfiguration">
|
<option name="arquillianRunConfiguration">
|
||||||
<value>
|
<value>
|
||||||
@ -124,6 +113,44 @@
|
|||||||
<option name="Make" enabled="true" />
|
<option name="Make" enabled="true" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="TennaTest.testOptimizedMath" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
|
<module name="codebank" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.ossez.toolkits.codebank.tests.interview.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<option name="PACKAGE_NAME" value="com.ossez.toolkits.codebank.tests.interview" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.ossez.toolkits.codebank.tests.interview.TennaTest" />
|
||||||
|
<option name="METHOD_NAME" value="testOptimizedMath" />
|
||||||
|
<option name="TEST_OBJECT" value="method" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration name="WayfairTest.testBuildCastles" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
|
<module name="codebank" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.ossez.toolkits.codebank.tests.interview.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<option name="PACKAGE_NAME" value="com.ossez.toolkits.codebank.tests.interview" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.ossez.toolkits.codebank.tests.interview.WayfairTest" />
|
||||||
|
<option name="METHOD_NAME" value="testBuildCastles" />
|
||||||
|
<option name="TEST_OBJECT" value="method" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<recent_temporary>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="JUnit.WayfairTest.testBuildCastles" />
|
||||||
|
<item itemvalue="JUnit.TennaTest.testOptimizedMath" />
|
||||||
|
</list>
|
||||||
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
<component name="TaskManager">
|
<component name="TaskManager">
|
||||||
@ -137,6 +164,7 @@
|
|||||||
<workItem from="1618147512704" duration="6933000" />
|
<workItem from="1618147512704" duration="6933000" />
|
||||||
<workItem from="1618246818887" duration="17236000" />
|
<workItem from="1618246818887" duration="17236000" />
|
||||||
<workItem from="1618429441584" duration="12732000" />
|
<workItem from="1618429441584" duration="12732000" />
|
||||||
|
<workItem from="1619409043090" duration="688000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="更新 POM 文件">
|
<task id="LOCAL-00001" summary="更新 POM 文件">
|
||||||
<created>1618147556538</created>
|
<created>1618147556538</created>
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ListNode {
|
|
||||||
public int val;
|
|
||||||
public ListNode next;
|
|
||||||
|
|
||||||
public ListNode(int x) {
|
|
||||||
val = x;
|
|
||||||
next = null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class TreeNode {
|
|
||||||
public int val;
|
|
||||||
public TreeNode left, right;
|
|
||||||
|
|
||||||
public TreeNode(int val) {
|
|
||||||
this.val = val;
|
|
||||||
this.left = this.right = null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.codility;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* More details about question see link below
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href= "https://www.cwiki.us/display/ITCLASSIFICATION/Binary+Gap">https://www.cwiki.us/display/ITCLASSIFICATION/Binary+Gap</a>
|
|
||||||
* </li>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class CodilityBinaryGapTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(CodilityBinaryGapTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
|
|
||||||
int N = 529;
|
|
||||||
String intStr = Integer.toBinaryString(N);
|
|
||||||
|
|
||||||
intStr = intStr.replace("1", "#1#");
|
|
||||||
|
|
||||||
String[] strArray = intStr.split("1");
|
|
||||||
|
|
||||||
int maxCount = 0;
|
|
||||||
for (int i = 0; i < strArray.length; i++) {
|
|
||||||
String checkStr = strArray[i];
|
|
||||||
int countLength = 0;
|
|
||||||
|
|
||||||
if (checkStr.length() > 2 && checkStr.startsWith("#") && checkStr.endsWith("#")) {
|
|
||||||
checkStr = checkStr.replace("#", "");
|
|
||||||
countLength = checkStr.length();
|
|
||||||
|
|
||||||
if (maxCount < countLength) {
|
|
||||||
maxCount = countLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logger.debug("MAX COUNT: [{}]", maxCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,131 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.TreeNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 7
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Serialize+and+Deserialize+Binary+Tree">https://www.cwiki.us/display/ITCLASSIFICATION/Serialize+and+Deserialize+Binary+Tree</a>
|
|
||||||
* <li>@see<a href=
|
|
||||||
* "https://www.lintcode.com/problem/serialize-and-deserialize-binary-tree">https://www.lintcode.com/problem/serialize-and-deserialize-binary-tree</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0007SerializeAndDeserializeTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0007SerializeAndDeserializeTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
String data = "{3,9,20,#,#,15,7}";
|
|
||||||
|
|
||||||
System.out.println(serialize(deserialize(data)));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserialize from array to tree
|
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private TreeNode deserialize(String data) {
|
|
||||||
// NULL CHECK
|
|
||||||
if (data.equals("{}")) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<TreeNode> treeList = new ArrayList<TreeNode>();
|
|
||||||
|
|
||||||
data = data.replace("{", "");
|
|
||||||
data = data.replace("}", "");
|
|
||||||
String[] vals = data.split(",");
|
|
||||||
|
|
||||||
// INSERT ROOT
|
|
||||||
TreeNode root = new TreeNode(Integer.parseInt(vals[0]));
|
|
||||||
treeList.add(root);
|
|
||||||
|
|
||||||
int index = 0;
|
|
||||||
boolean isLeftChild = true;
|
|
||||||
for (int i = 1; i < vals.length; i++) {
|
|
||||||
if (!vals[i].equals("#")) {
|
|
||||||
TreeNode node = new TreeNode(Integer.parseInt(vals[i]));
|
|
||||||
if (isLeftChild) {
|
|
||||||
treeList.get(index).left = node;
|
|
||||||
} else {
|
|
||||||
treeList.get(index).right = node;
|
|
||||||
}
|
|
||||||
treeList.add(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
// LEVEL
|
|
||||||
if (!isLeftChild) {
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MOVE TO RIGHT OR NEXT LEVEL
|
|
||||||
isLeftChild = !isLeftChild;
|
|
||||||
}
|
|
||||||
|
|
||||||
return root;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param root
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String serialize(TreeNode root) {
|
|
||||||
// write your code here
|
|
||||||
if (root == null) {
|
|
||||||
return "{}";
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<TreeNode> queue = new ArrayList<TreeNode>();
|
|
||||||
queue.add(root);
|
|
||||||
|
|
||||||
for (int i = 0; i < queue.size(); i++) {
|
|
||||||
TreeNode node = queue.get(i);
|
|
||||||
if (node == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
queue.add(node.left);
|
|
||||||
queue.add(node.right);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (queue.get(queue.size() - 1) == null) {
|
|
||||||
queue.remove(queue.size() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append("{");
|
|
||||||
sb.append(queue.get(0).val);
|
|
||||||
for (int i = 1; i < queue.size(); i++) {
|
|
||||||
if (queue.get(i) == null) {
|
|
||||||
sb.append(",#");
|
|
||||||
} else {
|
|
||||||
sb.append(",");
|
|
||||||
sb.append(queue.get(i).val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sb.append("}");
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,124 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Queue;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.TreeNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 69
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Binary+Tree+Level+Order+Traversal">https://www.cwiki.us/display/ITCLASSIFICATION/Binary+Tree+Level+Order+Traversal</a>
|
|
||||||
* <li>@see<a href=
|
|
||||||
* "https://www.lintcode.com/problem/binary-tree-level-order-traversal">https://www.lintcode.com/problem/binary-tree-level-order-traversal</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0069LevelOrderTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0069LevelOrderTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
String data = "{3,9,20,#,#,15,7}";
|
|
||||||
|
|
||||||
TreeNode tn = deserialize(data);
|
|
||||||
System.out.println(levelOrder(tn));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserialize from array to tree
|
|
||||||
*
|
|
||||||
* @param data
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private TreeNode deserialize(String data) {
|
|
||||||
// NULL CHECK
|
|
||||||
if (data.equals("{}")) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
ArrayList<TreeNode> treeList = new ArrayList<TreeNode>();
|
|
||||||
|
|
||||||
data = data.replace("{", "");
|
|
||||||
data = data.replace("}", "");
|
|
||||||
String[] vals = data.split(",");
|
|
||||||
|
|
||||||
// INSERT ROOT
|
|
||||||
TreeNode root = new TreeNode(Integer.parseInt(vals[0]));
|
|
||||||
treeList.add(root);
|
|
||||||
|
|
||||||
int index = 0;
|
|
||||||
boolean isLeftChild = true;
|
|
||||||
for (int i = 1; i < vals.length; i++) {
|
|
||||||
if (!vals[i].equals("#")) {
|
|
||||||
TreeNode node = new TreeNode(Integer.parseInt(vals[i]));
|
|
||||||
if (isLeftChild) {
|
|
||||||
treeList.get(index).left = node;
|
|
||||||
} else {
|
|
||||||
treeList.get(index).right = node;
|
|
||||||
}
|
|
||||||
treeList.add(node);
|
|
||||||
}
|
|
||||||
|
|
||||||
// LEVEL
|
|
||||||
if (!isLeftChild) {
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// MOVE TO RIGHT OR NEXT LEVEL
|
|
||||||
isLeftChild = !isLeftChild;
|
|
||||||
}
|
|
||||||
|
|
||||||
return root;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<List<Integer>> levelOrder(TreeNode root) {
|
|
||||||
Queue<TreeNode> queue = new LinkedList<TreeNode>();
|
|
||||||
List<List<Integer>> rs = new ArrayList<List<Integer>>();
|
|
||||||
|
|
||||||
// NULL CHECK
|
|
||||||
if (root == null) {
|
|
||||||
return rs;
|
|
||||||
}
|
|
||||||
|
|
||||||
queue.offer(root);
|
|
||||||
|
|
||||||
while (!queue.isEmpty()) {
|
|
||||||
int length = queue.size();
|
|
||||||
List<Integer> list = new ArrayList<Integer>();
|
|
||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
|
||||||
TreeNode curTN = queue.poll();
|
|
||||||
list.add(curTN.val);
|
|
||||||
if (curTN.left != null) {
|
|
||||||
queue.offer(curTN.left);
|
|
||||||
}
|
|
||||||
if (curTN.right != null) {
|
|
||||||
queue.offer(curTN.right);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
rs.add(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
return rs;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.ListNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 102
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Linked+List+Cycle">https://www.cwiki.us/display/ITCLASSIFICATION/Linked+List+Cycle</a>
|
|
||||||
* <li>@see<a href= "https://www.lintcode.com/problem/linked-list-cycle/">https://www.lintcode.com/problem/linked-list-cycle/</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0102HasCycleTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0102HasCycleTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
// INIT LINKED LIST
|
|
||||||
ListNode head = new ListNode(1);
|
|
||||||
head.next = new ListNode(2);
|
|
||||||
head.next.next = new ListNode(3);
|
|
||||||
head.next.next.next = new ListNode(4);
|
|
||||||
|
|
||||||
// CREATE A LOOP
|
|
||||||
head.next.next.next.next = head.next.next.next;
|
|
||||||
|
|
||||||
boolean retResult = false;
|
|
||||||
|
|
||||||
// LIKED LIST MAY NULL:
|
|
||||||
if (!(head == null || head.next == null)) {
|
|
||||||
ListNode s = head;
|
|
||||||
ListNode f = head.next;
|
|
||||||
|
|
||||||
while (f.next != null && f.next.next != null) {
|
|
||||||
|
|
||||||
s = s.next;
|
|
||||||
f = f.next.next;
|
|
||||||
|
|
||||||
if (f == s) {
|
|
||||||
retResult = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println(retResult);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,89 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.ListNode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 102
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Linked+List+Cycle">https://www.cwiki.us/display/ITCLASSIFICATION/Linked+List+Cycle</a>
|
|
||||||
* <li>@see<a href= "https://www.lintcode.com/problem/linked-list-cycle/">https://www.lintcode.com/problem/linked-list-cycle/</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0165MergeTwoListsTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0165MergeTwoListsTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
// INIT LINKED LIST l1
|
|
||||||
ListNode l1 = new ListNode(1);
|
|
||||||
l1.next = new ListNode(3);
|
|
||||||
l1.next.next = new ListNode(8);
|
|
||||||
l1.next.next.next = new ListNode(11);
|
|
||||||
l1.next.next.next.next = new ListNode(15);
|
|
||||||
|
|
||||||
// INIT LINKED LIST l2
|
|
||||||
ListNode l2 = new ListNode(2);
|
|
||||||
|
|
||||||
// RETURN RESULT
|
|
||||||
ListNode retResult = new ListNode(0);
|
|
||||||
|
|
||||||
// NULL CHECK
|
|
||||||
// if (l1 == null && l2 == null) {
|
|
||||||
// retResult = null;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (l1 == null) {
|
|
||||||
// retResult = l2;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if (l2 == null) {
|
|
||||||
// retResult = l1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// MERGE
|
|
||||||
retResult = new ListNode(0);
|
|
||||||
ListNode tmpNode = new ListNode(0);
|
|
||||||
retResult = tmpNode;
|
|
||||||
while (l1 != null & l2 != null) {
|
|
||||||
if (l1.val <= l2.val) {
|
|
||||||
tmpNode.next = l1;
|
|
||||||
l1 = l1.next;
|
|
||||||
} else {
|
|
||||||
tmpNode.next = l2;
|
|
||||||
l2 = l2.next;
|
|
||||||
}
|
|
||||||
|
|
||||||
tmpNode = tmpNode.next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (l1 == null) {
|
|
||||||
tmpNode.next = l2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (l2 == null) {
|
|
||||||
tmpNode.next = l1;
|
|
||||||
}
|
|
||||||
|
|
||||||
retResult = retResult.next;
|
|
||||||
|
|
||||||
System.out.println(retResult.val);
|
|
||||||
System.out.println(retResult.next.val);
|
|
||||||
System.out.println(retResult.next.next.val);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 425
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Letter+Combinations+of+a+Phone+Number">https://www.cwiki.us/display/ITCLASSIFICATION/Letter+Combinations+of+a+Phone+Number</a>
|
|
||||||
* <li>@see<a href=
|
|
||||||
* "https://www.lintcode.com/problem/letter-combinations-of-a-phone-number/description">https://www.lintcode.com/problem/letter-combinations-of-a-phone-number/description</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0425LetterCombinationsTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0425LetterCombinationsTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("LetterCombinationsTest");
|
|
||||||
String digits = "23";
|
|
||||||
|
|
||||||
HashMap<String, String> phoneKeyMap = new HashMap<String, String>();
|
|
||||||
phoneKeyMap.put("0", "");
|
|
||||||
phoneKeyMap.put("1", "");
|
|
||||||
phoneKeyMap.put("2", "abc");
|
|
||||||
phoneKeyMap.put("3", "def");
|
|
||||||
phoneKeyMap.put("4", "ghi");
|
|
||||||
phoneKeyMap.put("5", "jkl");
|
|
||||||
phoneKeyMap.put("6", "mno");
|
|
||||||
phoneKeyMap.put("7", "pqrs");
|
|
||||||
phoneKeyMap.put("8", "tuv");
|
|
||||||
phoneKeyMap.put("9", "wxyz");
|
|
||||||
|
|
||||||
List<String> retStatus = new ArrayList<>();
|
|
||||||
|
|
||||||
if (digits != null && digits.length() != 0) {
|
|
||||||
phoneRecursive(digits, retStatus, phoneKeyMap, "", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println(retStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* phoneRecursive
|
|
||||||
*
|
|
||||||
* @param digits
|
|
||||||
* @param retStatus
|
|
||||||
* @param phoneKeyMap
|
|
||||||
* @param comb
|
|
||||||
* @param index
|
|
||||||
*/
|
|
||||||
private void phoneRecursive(String digits, List<String> retStatus, HashMap<String, String> phoneKeyMap, String comb, int index) {
|
|
||||||
if (index == digits.length()) {
|
|
||||||
retStatus.add(comb);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
char pos = digits.charAt(index);
|
|
||||||
for (char c : ((String) phoneKeyMap.get(String.valueOf(pos))).toCharArray()) {
|
|
||||||
phoneRecursive(digits, retStatus, phoneKeyMap, comb + c, index + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 433
|
|
||||||
* <ul>
|
|
||||||
* <li>@see <a href=
|
|
||||||
* "https://www.cwiki.us/display/ITCLASSIFICATION/Number+of+Islands">https://www.cwiki.us/display/ITCLASSIFICATION/Number+of+Islands</a>
|
|
||||||
* <li>@see<a href="https://www.lintcode.com/problem/number-of-islands/">https://www.lintcode.com/problem/number-of-islands/</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode0433NumIslandsTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode0433NumIslandsTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
// INIT GRID
|
|
||||||
boolean[][] grid = { { true, true, false, false, false }, { false, true, false, false, true }, { false, false, false, true, true },
|
|
||||||
{ false, false, false, false, false }, { false, false, false, false, true }
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
// NULL CHECK
|
|
||||||
if (grid.length == 0 || grid[0].length == 0) {
|
|
||||||
System.out.println("NULL");
|
|
||||||
// return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// GET SIZE
|
|
||||||
int n = grid.length;
|
|
||||||
int m = grid[0].length;
|
|
||||||
|
|
||||||
// ARRAY FOR VISITED LOG
|
|
||||||
boolean[][] visited = new boolean[n][m];
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
|
|
||||||
// LOOP FOR GRID
|
|
||||||
for (int i = 0; i < n; i++) {
|
|
||||||
for (int j = 0; j < m; j++) {
|
|
||||||
if (grid[i][j] && !visited[i][j]) {
|
|
||||||
numIslandsDFS(grid, visited, i, j);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println(count);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param grid
|
|
||||||
* @param visited
|
|
||||||
* @param x
|
|
||||||
* @param y
|
|
||||||
*/
|
|
||||||
public void numIslandsDFS(boolean[][] grid, boolean[][] visited, int x, int y) {
|
|
||||||
if (x < 0 || x >= grid.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (y < 0 || y >= grid[0].length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (grid[x][y] != true || visited[x][y]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
visited[x][y] = true;
|
|
||||||
|
|
||||||
// Recursive call
|
|
||||||
numIslandsDFS(grid, visited, x - 1, y);
|
|
||||||
numIslandsDFS(grid, visited, x + 1, y);
|
|
||||||
numIslandsDFS(grid, visited, x, y - 1);
|
|
||||||
numIslandsDFS(grid, visited, x, y + 1);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
package com.ossez.codebank.algorithm.tests.lintcode;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 1480
|
|
||||||
* <ul>
|
|
||||||
* <li>@see
|
|
||||||
* <a href= "https://www.cwiki.us/display/ITCLASSIFICATION/Dot+Product">https://www.cwiki.us/display/ITCLASSIFICATION/Dot+Product</a>
|
|
||||||
* <li>@see<a href= "https://www.lintcode.com/problem/dot-product/">https://www.lintcode.com/problem/dot-product/</a>
|
|
||||||
* </ul>
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author YuCheng
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class LintCode1480DotProductTest {
|
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(LintCode1480DotProductTest.class);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testMain() {
|
|
||||||
logger.debug("BEGIN");
|
|
||||||
int t = 87;
|
|
||||||
int[] dur = { 20, 25, 19, 37 };
|
|
||||||
// Write your code here
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
19
toolkits/.idea/compiler.xml
generated
19
toolkits/.idea/compiler.xml
generated
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="CompilerConfiguration">
|
|
||||||
<annotationProcessing>
|
|
||||||
<profile name="Maven default annotation processors profile" enabled="true">
|
|
||||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
|
||||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
|
||||||
<outputRelativeToContentRoot value="true" />
|
|
||||||
<module name="codebank" />
|
|
||||||
<module name="discourse" />
|
|
||||||
</profile>
|
|
||||||
</annotationProcessing>
|
|
||||||
<bytecodeTargetLevel>
|
|
||||||
<module name="codebank" target="11" />
|
|
||||||
<module name="discourse" target="11" />
|
|
||||||
<module name="toolkits" target="11" />
|
|
||||||
</bytecodeTargetLevel>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
7
toolkits/.idea/encodings.xml
generated
7
toolkits/.idea/encodings.xml
generated
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="Encoding">
|
|
||||||
<file url="file://$PROJECT_DIR$/codebank/src/main/java" charset="UTF-8" />
|
|
||||||
<file url="file://$PROJECT_DIR$/discourse/src/main/java" charset="UTF-8" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
20
toolkits/.idea/jarRepositories.xml
generated
20
toolkits/.idea/jarRepositories.xml
generated
@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RemoteRepositoriesConfiguration">
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Central Repository" />
|
|
||||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="central" />
|
|
||||||
<option name="name" value="Maven Central repository" />
|
|
||||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
|
||||||
</remote-repository>
|
|
||||||
<remote-repository>
|
|
||||||
<option name="id" value="jboss.community" />
|
|
||||||
<option name="name" value="JBoss Community repository" />
|
|
||||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
|
||||||
</remote-repository>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
6
toolkits/.idea/vcs.xml
generated
6
toolkits/.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview;
|
package com.ossez.toolkits.codebank.common.interview;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview;
|
package com.ossez.toolkits.codebank.common.interview;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview;
|
package com.ossez.toolkits.codebank.common.interview;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
@ -1,8 +1,10 @@
|
|||||||
package com.ossez.codebank.algorithml.utils;
|
package com.ossez.toolkits.codebank.common.utils;
|
||||||
|
|
||||||
|
import com.ossez.toolkits.codebank.common.model.TreeNode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.TreeNode;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.algorithm.tests;
|
package com.ossez.toolkits.codebank.tests;
|
||||||
|
|
||||||
import org.apache.commons.math3.util.FastMath;
|
import org.apache.commons.math3.util.FastMath;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
@ -1,18 +1,12 @@
|
|||||||
package com.ossez.lang.tutorial.tests;
|
package com.ossez.toolkits.codebank.tests;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.TreeSet;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.management.ListenerNotFoundException;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.algorithm.tests;
|
package com.ossez.toolkits.codebank.tests;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
@ -1,14 +1,15 @@
|
|||||||
package com.ossez.codebank.algorithm.tests;
|
package com.ossez.toolkits.codebank.tests;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ossez.toolkits.codebank.common.model.TreeNode;
|
||||||
|
import com.ossez.toolkits.codebank.common.utils.TreeUtils;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.ossez.codebank.algorithm.models.TreeNode;
|
|
||||||
import com.ossez.codebank.algorithml.utils.TreeUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
@ -54,7 +54,8 @@ public class VariableTest extends TestCase {
|
|||||||
public void testStaticVariableChange() {
|
public void testStaticVariableChange() {
|
||||||
|
|
||||||
OssezVariable objA = new OssezVariable(1, 2, 3);
|
OssezVariable objA = new OssezVariable(1, 2, 3);
|
||||||
logger.debug("s1/s2/s3 - [{}]/[{}]/[{}]", objA.s1, objA.s2, OssezVariable.s3);
|
logger.debug("s1/s2/s3 - [{}]", Math.round(10.55));
|
||||||
|
|
||||||
|
|
||||||
OssezVariable objB = new OssezVariable(4, 5, 6);
|
OssezVariable objB = new OssezVariable(4, 5, 6);
|
||||||
logger.debug("s1/s2/s3 - [{}]/[{}]/[{}]", objA.s1, objA.s2, OssezVariable.s3);
|
logger.debug("s1/s2/s3 - [{}]/[{}]/[{}]", objA.s1, objA.s2, OssezVariable.s3);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
@ -1,13 +1,14 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.ossez.codebank.interview.KayakCountUpDown;
|
import com.ossez.toolkits.codebank.common.interview.KayakCountUpDown;
|
||||||
import com.ossez.codebank.interview.KayakRobotMovement;
|
import com.ossez.toolkits.codebank.common.interview.KayakRobotMovement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -30,8 +31,8 @@ public class KayakTest {
|
|||||||
logger.debug("LFFF - [{}]", KayakRobotMovement.getCoordinates("FF"));
|
logger.debug("LFFF - [{}]", KayakRobotMovement.getCoordinates("FF"));
|
||||||
logger.debug("LFFFRFFFRRFFF - [{}]", KayakRobotMovement.getCoordinates("LFFFRFFFRRFFF"));
|
logger.debug("LFFFRFFFRRFFF - [{}]", KayakRobotMovement.getCoordinates("LFFFRFFFRRFFF"));
|
||||||
|
|
||||||
assertEquals(KayakRobotMovement.getCoordinates("FF"), "0,2");
|
Assert.assertEquals(KayakRobotMovement.getCoordinates("FF"), "0,2");
|
||||||
assertEquals(KayakRobotMovement.getCoordinates("LFFFRFFFRRFFF"), "-3,0");
|
Assert.assertEquals(KayakRobotMovement.getCoordinates("LFFFRFFFRRFFF"), "-3,0");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview.tests.others;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
@ -1,12 +1,9 @@
|
|||||||
package com.ossez.codebank.interview.tests.others;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Minimum Coins
|
* For Minimum Coins
|
||||||
*
|
*
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.ossez.codebank.interview.tests;
|
package com.ossez.toolkits.codebank.tests.interview;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -52,6 +52,14 @@
|
|||||||
<target>${java.version}</target>
|
<target>${java.version}</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>11</source>
|
||||||
|
<target>11</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user