Skip to content

Commit 2ffca59

Browse files
Update README.md
1 parent 3793a08 commit 2ffca59

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

_notes_others/leetcode_dsa_patterns/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,34 @@ NOTE: This is a helper flowchart, it covers majority of problems. But, it is not
1010

1111

1212

13+
```kotlin
14+
var mutableList = mutableListOf("Mahipal","Nikhil","Rahul")
15+
mutableList[0] = "Praveen"
16+
mutableList.add("Abhi")
17+
for(item in mutableList){
18+
println(item)
19+
}
20+
21+
var mutableSet = mutableSetOf<Int>(6,10)
22+
mutableSet.add(2)
23+
mutableSet.add(5)
24+
for(item in mutableSet){
25+
println(item)
26+
}
27+
28+
var mutableMap = mutableMapOf<Int,String>(1 to "Mahipal",2 to "Nikhil",3 to "Rahul")
29+
mutableMap.put(1,"Praveen")
30+
mutableMap.put(4,"Abhi")
31+
for(value in mutableMap.values){
32+
println(value)
33+
}
34+
for(key in immutableMap.keys){
35+
println(immutableMap[key])
36+
}
37+
```
38+
39+
40+
1341
```kotlin
1442
fun main() {
1543
var myList = LinkedList()

0 commit comments

Comments
 (0)