Skip to content

Commit 769cce2

Browse files
committed
Removed useless coroutine cancel
1 parent 053ecac commit 769cce2

File tree

1 file changed

+0
-39
lines changed
  • app/src/main/java/dev/gbenga/dsagithub/nav

1 file changed

+0
-39
lines changed

app/src/main/java/dev/gbenga/dsagithub/nav/Routes.kt

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,42 +10,3 @@ data object Home: Screen
1010

1111
@Serializable
1212
data class GithubDetails(val userData: User? = null): Screen
13-
14-
15-
class Solution {
16-
fun isValid(s: String): Boolean {
17-
val dict = mapOf<Char, Char>('{' to '}', '[' to ']', '(' to ')')
18-
val stack = mutableListOf<Char>()
19-
20-
s.forEach{
21-
// dict[it]?.let{
22-
// stack.add(it)
23-
// }: stack.isEmpty() && dict[stack.pop()] != it false
24-
if (dict[it] != null){
25-
stack.add(it)
26-
}else{
27-
if (stack.isNotEmpty() && dict[stack.pop()] != it){
28-
return false
29-
}
30-
}
31-
}
32-
return stack.isNotEmpty()
33-
}
34-
35-
fun <T> MutableList<T>.pop(): T{
36-
val lIndex = this.size -1
37-
val last = this[lIndex]
38-
removeAt(lIndex)
39-
return last
40-
}
41-
42-
43-
}
44-
45-
// ())()()
46-
/*
47-
c += 2
48-
find invalid
49-
c = max(c, cm)
50-
51-
*/

0 commit comments

Comments
 (0)