Skip to content

Commit 54191eb

Browse files
author
C5141506
committed
added gitignore
1 parent fb7b311 commit 54191eb

20 files changed

+50
-178
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#dir
2+
.idea
3+
out
4+
#files
5+
*.log
6+
*.class

.idea/.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.idea/kotlinc.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.idea/libraries/KotlinJavaRuntime.xml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.idea/misc.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/modules.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.idea/uiDesigner.xml

Lines changed: 0 additions & 124 deletions
This file was deleted.

LeetCode_DSA_Problem.iml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<component name="NewModuleRootManager" inherit-compiler-output="true">
44
<exclude-output />
55
<content url="file://$MODULE_DIR$">
6-
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
76
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
87
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
98
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
9+
<sourceFolder url="file://$MODULE_DIR$/src/main/problems" isTestSource="false" />
1010
</content>
1111
<orderEntry type="inheritedJdk" />
1212
<orderEntry type="sourceFolder" forTests="false" />
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1.33 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/main/kotlin/DecodeTheMessage.java renamed to src/main/problems/java/DecodeTheMessage.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package java;
2+
13
import java.util.HashMap;
24

35
public class DecodeTheMessage {

src/main/kotlin/Palindrome.java renamed to src/main/problems/java/Palindrome.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package java;
2+
13
public class Palindrome {
24
public static void main(String args[]) {
35
String sentence = "A man, a plan, a canal: Panama";

src/main/kotlin/PangramSentence.java renamed to src/main/problems/java/PangramSentence.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package java;
2+
13
import java.util.ArrayList;
24

35
public class PangramSentence {

src/main/kotlin/DecodeTheMessageKotlin.kt renamed to src/main/problems/kotlin/DecodeTheMessageKotlin.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package kotlin
2+
13
import java.util.HashMap
24

35
object DecodeTheMessageKotlin {

src/main/kotlin/Main.kt renamed to src/main/problems/kotlin/Main.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
package kotlin
2+
13
fun main(args: Array<String>) {
24
println("Hello World!")
35

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package kotlin
2+
3+
object ReverseArrayIndexValue {
4+
@JvmStatic
5+
fun main(args: Array<String>) {
6+
val nameList = mutableListOf<String>("darshna", "radhav", "raj", "rani", "priya")
7+
//var revListName=Array<String>(5)
8+
for ((index, name) in nameList.withIndex()) {
9+
val charName = name.toCharArray()
10+
var start = 0
11+
var end = name.length - 1
12+
while (start <= end) {
13+
val temp = charName[start]
14+
charName[start] = charName[end]
15+
charName[end] = temp
16+
start++
17+
end--
18+
}
19+
nameList[index] = String(charName)
20+
println(nameList[index])
21+
}
22+
nameList.sortWith(NameSort())
23+
println(nameList)
24+
25+
26+
}
27+
28+
class NameSort() : Comparator<String> {
29+
override fun compare(o1: String?, o2: String?): Int {
30+
return o1!!.compareTo(o2.toString())
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)