diff --git a/.gradle/3.5-rc-2/file-changes/last-build.bin b/.gradle/3.5-rc-2/file-changes/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/.gradle/3.5-rc-2/file-changes/last-build.bin differ
diff --git a/.gradle/3.5-rc-2/taskHistory/fileHashes.bin b/.gradle/3.5-rc-2/taskHistory/fileHashes.bin
new file mode 100644
index 0000000..04147f7
Binary files /dev/null and b/.gradle/3.5-rc-2/taskHistory/fileHashes.bin differ
diff --git a/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin b/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin
new file mode 100644
index 0000000..7d46396
Binary files /dev/null and b/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin differ
diff --git a/.gradle/3.5-rc-2/taskHistory/taskHistory.bin b/.gradle/3.5-rc-2/taskHistory/taskHistory.bin
new file mode 100644
index 0000000..3e02449
Binary files /dev/null and b/.gradle/3.5-rc-2/taskHistory/taskHistory.bin differ
diff --git a/.gradle/3.5-rc-2/taskHistory/taskHistory.lock b/.gradle/3.5-rc-2/taskHistory/taskHistory.lock
new file mode 100644
index 0000000..e65b9d8
Binary files /dev/null and b/.gradle/3.5-rc-2/taskHistory/taskHistory.lock differ
diff --git a/.gradle/buildOutputCleanup/built.bin b/.gradle/buildOutputCleanup/built.bin
new file mode 100644
index 0000000..e69de29
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..8264c92
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Sun Oct 08 23:18:42 CEST 2017
+gradle.version=3.5-rc-2
diff --git a/.gradle/buildOutputCleanup/cache.properties.lock b/.gradle/buildOutputCleanup/cache.properties.lock
new file mode 100644
index 0000000..40fdece
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties.lock
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..d519965
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..223c7ea
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..5806fb3
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_google_guava_guava_20_0.xml b/.idea/libraries/Gradle__com_google_guava_guava_20_0.xml
new file mode 100644
index 0000000..3030ca0
--- /dev/null
+++ b/.idea/libraries/Gradle__com_google_guava_guava_20_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__io_kotlintest_kotlintest_2_0_6.xml b/.idea/libraries/Gradle__io_kotlintest_kotlintest_2_0_6.xml
new file mode 100644
index 0000000..684c1f6
--- /dev/null
+++ b/.idea/libraries/Gradle__io_kotlintest_kotlintest_2_0_6.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__junit_junit_4_12.xml b/.idea/libraries/Gradle__junit_junit_4_12.xml
new file mode 100644
index 0000000..04c10dd
--- /dev/null
+++ b/.idea/libraries/Gradle__junit_junit_4_12.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_1_6_5.xml b/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_1_6_5.xml
new file mode 100644
index 0000000..21acc40
--- /dev/null
+++ b/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_1_6_5.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_agent_1_6_5.xml b/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_agent_1_6_5.xml
new file mode 100644
index 0000000..c4072fe
--- /dev/null
+++ b/.idea/libraries/Gradle__net_bytebuddy_byte_buddy_agent_1_6_5.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml
new file mode 100644
index 0000000..8262f72
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_javassist_javassist_3_21_0_GA.xml b/.idea/libraries/Gradle__org_javassist_javassist_3_21_0_GA.xml
new file mode 100644
index 0000000..c3bb60f
--- /dev/null
+++ b/.idea/libraries/Gradle__org_javassist_javassist_3_21_0_GA.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml b/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml
new file mode 100644
index 0000000..4f32fde
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_reflect_1_1_51.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_reflect_1_1_51.xml
new file mode 100644
index 0000000..cc71525
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_reflect_1_1_51.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_51.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_51.xml
new file mode 100644
index 0000000..5b59b00
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_1_51.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre7_1_1_51.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre7_1_1_51.xml
new file mode 100644
index 0000000..52b0b6d
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre7_1_1_51.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre8_1_1_51.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre8_1_1_51.xml
new file mode 100644
index 0000000..6e63078
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jre8_1_1_51.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_mockito_mockito_core_2_7_11.xml b/.idea/libraries/Gradle__org_mockito_mockito_core_2_7_11.xml
new file mode 100644
index 0000000..965fad5
--- /dev/null
+++ b/.idea/libraries/Gradle__org_mockito_mockito_core_2_7_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_objenesis_objenesis_2_5.xml b/.idea/libraries/Gradle__org_objenesis_objenesis_2_5.xml
new file mode 100644
index 0000000..a3418a6
--- /dev/null
+++ b/.idea/libraries/Gradle__org_objenesis_objenesis_2_5.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_reflections_reflections_0_9_11.xml b/.idea/libraries/Gradle__org_reflections_reflections_0_9_11.xml
new file mode 100644
index 0000000..b533fcf
--- /dev/null
+++ b/.idea/libraries/Gradle__org_reflections_reflections_0_9_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..652851f
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7e89adf
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/datastructures.iml b/.idea/modules/datastructures.iml
new file mode 100644
index 0000000..9447f6b
--- /dev/null
+++ b/.idea/modules/datastructures.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/datastructures_main.iml b/.idea/modules/datastructures_main.iml
new file mode 100644
index 0000000..08c4c46
--- /dev/null
+++ b/.idea/modules/datastructures_main.iml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/datastructures_test.iml b/.idea/modules/datastructures_test.iml
new file mode 100644
index 0000000..6679c57
--- /dev/null
+++ b/.idea/modules/datastructures_test.iml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/sem1.iml b/.idea/modules/sem1.iml
new file mode 100644
index 0000000..3d9af72
--- /dev/null
+++ b/.idea/modules/sem1.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/sem1_main.iml b/.idea/modules/sem1_main.iml
new file mode 100644
index 0000000..fef9854
--- /dev/null
+++ b/.idea/modules/sem1_main.iml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/sem1_test.iml b/.idea/modules/sem1_test.iml
new file mode 100644
index 0000000..114eb30
--- /dev/null
+++ b/.idea/modules/sem1_test.iml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..0e1279b
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,1521 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ get
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1507497438577
+
+
+ 1507497438577
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file://$PROJECT_DIR$/datastructures/src/main/kotlin/two_three_tree.kt
+ 34
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Kotlin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1.8
+
+
+
+
+
+
+
+
+
+
+
+ datastructures_main|datastructures
+
+
+
+
+
+
+
+
+
+
+
+
+ Gradle: org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.51
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..3c2e7d3
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,30 @@
+group 'com.chmelar.sem1'
+version '1.0'
+
+buildscript {
+ ext.kotlin_version = '1.1.51'
+
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+apply plugin: 'kotlin'
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
+}
+
+compileKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
+compileTestKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
\ No newline at end of file
diff --git a/build/kotlin-build/version.txt b/build/kotlin-build/version.txt
new file mode 100644
index 0000000..01aabac
--- /dev/null
+++ b/build/kotlin-build/version.txt
@@ -0,0 +1 @@
+11001
\ No newline at end of file
diff --git a/datastructures/.gradle/3.5-rc-2/file-changes/last-build.bin b/datastructures/.gradle/3.5-rc-2/file-changes/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/datastructures/.gradle/3.5-rc-2/file-changes/last-build.bin differ
diff --git a/datastructures/.gradle/3.5-rc-2/taskHistory/fileHashes.bin b/datastructures/.gradle/3.5-rc-2/taskHistory/fileHashes.bin
new file mode 100644
index 0000000..07488db
Binary files /dev/null and b/datastructures/.gradle/3.5-rc-2/taskHistory/fileHashes.bin differ
diff --git a/datastructures/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin b/datastructures/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin
new file mode 100644
index 0000000..3077730
Binary files /dev/null and b/datastructures/.gradle/3.5-rc-2/taskHistory/fileSnapshots.bin differ
diff --git a/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.bin b/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.bin
new file mode 100644
index 0000000..3737f23
Binary files /dev/null and b/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.bin differ
diff --git a/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.lock b/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.lock
new file mode 100644
index 0000000..7305c05
Binary files /dev/null and b/datastructures/.gradle/3.5-rc-2/taskHistory/taskHistory.lock differ
diff --git a/datastructures/.gradle/buildOutputCleanup/built.bin b/datastructures/.gradle/buildOutputCleanup/built.bin
new file mode 100644
index 0000000..e69de29
diff --git a/datastructures/.gradle/buildOutputCleanup/cache.properties b/datastructures/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..a55ef24
--- /dev/null
+++ b/datastructures/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Sun Oct 08 23:18:38 CEST 2017
+gradle.version=3.5-rc-2
diff --git a/datastructures/.gradle/buildOutputCleanup/cache.properties.lock b/datastructures/.gradle/buildOutputCleanup/cache.properties.lock
new file mode 100644
index 0000000..40fdece
--- /dev/null
+++ b/datastructures/.gradle/buildOutputCleanup/cache.properties.lock
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/datastructures/build.gradle b/datastructures/build.gradle
new file mode 100644
index 0000000..fdef434
--- /dev/null
+++ b/datastructures/build.gradle
@@ -0,0 +1,31 @@
+group 'datastructures'
+version '1.0-SNAPSHOT'
+
+buildscript {
+ ext.kotlin_version = '1.1.51'
+
+ repositories {
+ mavenCentral()
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+apply plugin: 'kotlin'
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
+ testCompile 'io.kotlintest:kotlintest:2.0.6'
+}
+
+compileKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
+compileTestKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
\ No newline at end of file
diff --git a/datastructures/build/kotlin-build/version.txt b/datastructures/build/kotlin-build/version.txt
new file mode 100644
index 0000000..01aabac
--- /dev/null
+++ b/datastructures/build/kotlin-build/version.txt
@@ -0,0 +1 @@
+11001
\ No newline at end of file
diff --git a/datastructures/gradle/wrapper/gradle-wrapper.jar b/datastructures/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..bf54ab5
Binary files /dev/null and b/datastructures/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/datastructures/gradle/wrapper/gradle-wrapper.properties b/datastructures/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..4f93fce
--- /dev/null
+++ b/datastructures/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Oct 08 23:20:21 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip
diff --git a/datastructures/gradlew b/datastructures/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/datastructures/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save ( ) {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/datastructures/gradlew.bat b/datastructures/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/datastructures/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/datastructures/out/production/classes/Chmelar.class b/datastructures/out/production/classes/Chmelar.class
new file mode 100644
index 0000000..cfced7e
Binary files /dev/null and b/datastructures/out/production/classes/Chmelar.class differ
diff --git a/datastructures/out/production/classes/KeyValue.class b/datastructures/out/production/classes/KeyValue.class
new file mode 100644
index 0000000..7108def
Binary files /dev/null and b/datastructures/out/production/classes/KeyValue.class differ
diff --git a/datastructures/out/production/classes/META-INF/datastructures_main.kotlin_module b/datastructures/out/production/classes/META-INF/datastructures_main.kotlin_module
new file mode 100644
index 0000000..efb6419
Binary files /dev/null and b/datastructures/out/production/classes/META-INF/datastructures_main.kotlin_module differ
diff --git a/datastructures/out/production/classes/Map.class b/datastructures/out/production/classes/Map.class
new file mode 100644
index 0000000..075803d
Binary files /dev/null and b/datastructures/out/production/classes/Map.class differ
diff --git a/datastructures/out/production/classes/Node$FourNode.class b/datastructures/out/production/classes/Node$FourNode.class
new file mode 100644
index 0000000..568b4d6
Binary files /dev/null and b/datastructures/out/production/classes/Node$FourNode.class differ
diff --git a/datastructures/out/production/classes/Node$TwoThreeNode.class b/datastructures/out/production/classes/Node$TwoThreeNode.class
new file mode 100644
index 0000000..62dcc1a
Binary files /dev/null and b/datastructures/out/production/classes/Node$TwoThreeNode.class differ
diff --git a/datastructures/out/production/classes/Node.class b/datastructures/out/production/classes/Node.class
new file mode 100644
index 0000000..a2ab104
Binary files /dev/null and b/datastructures/out/production/classes/Node.class differ
diff --git a/datastructures/out/production/classes/NodeKt.class b/datastructures/out/production/classes/NodeKt.class
new file mode 100644
index 0000000..f7dba51
Binary files /dev/null and b/datastructures/out/production/classes/NodeKt.class differ
diff --git a/datastructures/out/production/classes/TwoThreeTree.class b/datastructures/out/production/classes/TwoThreeTree.class
new file mode 100644
index 0000000..aa7fba3
Binary files /dev/null and b/datastructures/out/production/classes/TwoThreeTree.class differ
diff --git a/datastructures/out/test/classes/MySpec$1.class b/datastructures/out/test/classes/MySpec$1.class
new file mode 100644
index 0000000..7ca7f49
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$1.class differ
diff --git a/datastructures/out/test/classes/MySpec$2.class b/datastructures/out/test/classes/MySpec$2.class
new file mode 100644
index 0000000..f5fcce6
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$2.class differ
diff --git a/datastructures/out/test/classes/MySpec$3.class b/datastructures/out/test/classes/MySpec$3.class
new file mode 100644
index 0000000..e79b853
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$3.class differ
diff --git a/datastructures/out/test/classes/MySpec$4.class b/datastructures/out/test/classes/MySpec$4.class
new file mode 100644
index 0000000..864c3a3
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$4.class differ
diff --git a/datastructures/out/test/classes/MySpec$5.class b/datastructures/out/test/classes/MySpec$5.class
new file mode 100644
index 0000000..5f6e131
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$5.class differ
diff --git a/datastructures/out/test/classes/MySpec$6.class b/datastructures/out/test/classes/MySpec$6.class
new file mode 100644
index 0000000..3df6f7e
Binary files /dev/null and b/datastructures/out/test/classes/MySpec$6.class differ
diff --git a/datastructures/out/test/classes/MySpec.class b/datastructures/out/test/classes/MySpec.class
new file mode 100644
index 0000000..0d4650c
Binary files /dev/null and b/datastructures/out/test/classes/MySpec.class differ
diff --git a/datastructures/settings.gradle b/datastructures/settings.gradle
new file mode 100644
index 0000000..9da084b
--- /dev/null
+++ b/datastructures/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'datastructures'
+
diff --git a/datastructures/src/main/kotlin/Map.kt b/datastructures/src/main/kotlin/Map.kt
new file mode 100644
index 0000000..71b6ac5
--- /dev/null
+++ b/datastructures/src/main/kotlin/Map.kt
@@ -0,0 +1,9 @@
+import java.util.*
+
+interface Map{
+fun get(byKey:K) : V?
+
+fun put(key:K,value:V) : V?
+
+fun remove(key:K)
+}
\ No newline at end of file
diff --git a/datastructures/src/main/kotlin/node.kt b/datastructures/src/main/kotlin/node.kt
new file mode 100644
index 0000000..37cb715
--- /dev/null
+++ b/datastructures/src/main/kotlin/node.kt
@@ -0,0 +1,40 @@
+data class Chmelar(val l:String)
+
+sealed class Node, V>{
+ abstract var keyValue1 : KeyValue?
+ abstract var keyValue2 : KeyValue?
+ abstract var left : Node ?
+ abstract var right : Node ?
+ abstract var middle : Node ?
+ abstract var parent : Node ?
+ fun isTwoNode() = keyValue2==null
+ fun isThreeNode() = !isTwoNode()
+
+ data class TwoThreeNode, V>(
+ override var keyValue1 : KeyValue? = null,
+ override var keyValue2 : KeyValue? = null,
+ override var left : Node ? = null,
+ override var right : Node ? = null,
+ override var middle : Node ? = null,
+ override var parent : Node ? = null
+ ) :Node()
+
+ data class FourNode , V>(
+ override var keyValue1 : KeyValue? = null,
+ override var keyValue2 : KeyValue? = null,
+ var keyValue3 : KeyValue? = null,
+ override var left : Node ? = null,
+ override var right : Node ? = null,
+ override var middle : Node ? = null,
+ var middle2 : Node ? = null,
+ override var parent : Node ? = null
+ ) :Node()
+}
+
+
+
+
+
+
+data class KeyValue, V>(val key: K, var value: V)
+infix fun , V> K.with(value: V) = KeyValue(this, value)
diff --git a/datastructures/src/main/kotlin/two_three_tree.kt b/datastructures/src/main/kotlin/two_three_tree.kt
new file mode 100644
index 0000000..d0c13e2
--- /dev/null
+++ b/datastructures/src/main/kotlin/two_three_tree.kt
@@ -0,0 +1,95 @@
+import Node.FourNode
+
+
+
+
+class TwoThreeTree,V>:Map {
+ internal var root : Node? = null
+
+ override fun put(key: K, value: V): V? {
+ if(root==null){
+ root= Node.TwoThreeNode(key with value)
+ return value
+ }
+ else {
+ val foundNode = getNode(key,root!!)
+ if(foundNode.isTwoNode()){
+ when{
+ key < foundNode.keyValue1!! -> {
+ foundNode.keyValue2 = foundNode.keyValue1
+ foundNode.keyValue1 = key with value
+ return value
+ }
+ key > foundNode.keyValue1!! -> {
+ foundNode.keyValue2 = key with value
+ return value
+ }
+ }
+ }else if(foundNode.isThreeNode()){
+ var fourNode : FourNode? = null
+ when{
+ key < foundNode.keyValue1!! -> fourNode = FourNode(key with value, foundNode.keyValue1, foundNode.keyValue2)
+ key > foundNode.keyValue1!! && key < foundNode.keyValue2!! -> fourNode = FourNode(foundNode.keyValue1, key with value , foundNode.keyValue2)
+ key > foundNode.keyValue2!! -> fourNode = FourNode(foundNode.keyValue1, foundNode.keyValue2, key with value)
+ }
+ insertFourNode(fourNode,foundNode)
+ return null
+ }
+ }
+ return null
+ }
+
+ private fun insertFourNode(fourNode: FourNode?, foundNode: Node) {
+ when{
+ foundNode.parent == null -> {
+ root = Node.TwoThreeNode(fourNode!!.keyValue2,
+ left = Node.TwoThreeNode(fourNode.keyValue1),right = Node.TwoThreeNode(fourNode.keyValue3)
+ )
+ }
+ foundNode.parent!!.isTwoNode() ->{
+ var node = Node.TwoThreeNode()
+ when{
+ fourNode!!.keyValue2!!.key < foundNode.parent!!.keyValue1!! ->
+ node = Node.TwoThreeNode(fourNode.keyValue2,foundNode.parent!!.keyValue1)
+ foundNode.keyValue2!!.key > foundNode.parent!!.keyValue1!! ->
+ node = Node.TwoThreeNode(foundNode.parent!!.keyValue1,fourNode.keyValue2)
+ }
+ with(node){
+ left = Node.TwoThreeNode(fourNode!!.keyValue1)
+ middle = Node.TwoThreeNode(fourNode .keyValue3)
+ right = foundNode.parent!!.right
+ foundNode.parent=node
+ }
+
+ }
+ }
+ }
+
+ private operator fun K.compareTo(keyValue: KeyValue) = this.compareTo(keyValue.key)
+
+ internal fun getNode(key: K, startNode: Node): Node {
+ return when {
+ startNode.left == null -> startNode
+ startNode.keyValue1!!.key == key -> startNode
+ key < startNode.keyValue1!!.key -> getNode(key, startNode.left!!)
+ startNode.isTwoNode() -> getNode(key, startNode.middle!!)
+ startNode.isThreeNode() -> when {
+ key == startNode.keyValue2 -> startNode
+ key > startNode.keyValue2!!.key -> getNode(key, startNode.right!!)
+ key > startNode.keyValue1!!.key
+ &&
+ key < startNode.keyValue2!!.key -> getNode(key, startNode.middle!!)
+ else -> throw IllegalStateException("wat")
+ }
+
+ else -> throw IllegalStateException("wat")
+ }
+ }
+ override fun get(byKey: K): V? {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+
+ override fun remove(key: K) {
+ TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
+ }
+}
\ No newline at end of file
diff --git a/datastructures/src/test/kotlin/tree.kt b/datastructures/src/test/kotlin/tree.kt
new file mode 100644
index 0000000..84d3b80
--- /dev/null
+++ b/datastructures/src/test/kotlin/tree.kt
@@ -0,0 +1,69 @@
+import io.kotlintest.matchers.shouldBe
+import io.kotlintest.specs.StringSpec
+
+//http://www.allsyllabus.com/aj/note/Computer_Science/Analysis_and_Design_of_Algorithms/Unit5/Construction%20of%20AVL%20tree.php#.WdoSaa10Dq0
+//https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/2-3_insertion.svg/2000px-2-3_insertion.svg.png
+
+class MySpec : StringSpec() {
+ val tree= TwoThreeTree()
+ val key= listOf(9, 5, 8, 3, 2, 4, 7)
+ val value = 4
+ init {
+ "i. first node is root"{
+ tree.put(key[0],value)
+ tree.root shouldBe Node.TwoThreeNode(key[0] with value)
+ println(tree.root)
+ }
+
+ "ii second input is in root"{
+ tree.put(key[0],value)
+ tree.put(key[1],value)
+ tree.root shouldBe Node.TwoThreeNode(key[1] with value,key[0] with value)
+ println(tree.root)
+
+ }
+
+ "iii third input puts key[2] to the top"{
+ tree.put(key[0],value)
+ tree.put(key[1],value)
+ tree.put(key[2],value)
+ tree.root shouldBe Node.TwoThreeNode(
+ 8 with value,
+ left = Node.TwoThreeNode(5 with value), right = Node.TwoThreeNode(9 with value))
+ println(tree.root)
+
+ }
+ "iv insert 6 so it's in the left bottom child"{
+ tree.put(key[0],value)
+ tree.put(key[1],value)
+ tree.put(key[2],value)
+ tree.put(key[3],value)
+ tree.root shouldBe Node.TwoThreeNode(
+ 8 with value,
+ left = Node.TwoThreeNode(3 with value,5 with value), right = Node.TwoThreeNode(9 with value))
+ println(tree.root)
+
+ }
+ "v when I insert 2 get node should be 35 node"{
+ tree.put(key[0],value)
+ tree.put(key[1],value)
+ tree.put(key[2],value)
+ tree.put(key[3],value)
+ tree.getNode(key[4],tree.root!!) shouldBe Node.TwoThreeNode(3 with value,5 with value)
+ }
+ "v insert 2 so I have ThreeNode as parent"{
+ tree.put(key[0],value)
+ tree.put(key[1],value)
+ tree.put(key[2],value)
+ tree.put(key[3],value)
+ tree.put(key[4],value)
+ tree.root shouldBe Node.TwoThreeNode(3 with value,8 with value,
+ left=Node.TwoThreeNode(2 with value),middle = Node.TwoThreeNode(5 with value),right = Node.TwoThreeNode(9 with value))
+ println(tree.root)
+ }
+
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f8eb72e
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..fd979e8
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Sun Oct 08 23:20:36 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-rc-2-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..4453cce
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save ( ) {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..e95643d
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..14c36d2
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'sem1'
+
diff --git a/src/main/kotlin/main.kt b/src/main/kotlin/main.kt
new file mode 100644
index 0000000..4520eef
--- /dev/null
+++ b/src/main/kotlin/main.kt
@@ -0,0 +1,3 @@
+fun main(args: Array) {
+ val l= Chmelar("a")
+}
\ No newline at end of file