Skip to content

Instantly share code, notes, and snippets.

View fatemeh-afshari's full-sized avatar

Fatemeh Afshari fatemeh-afshari

View GitHub Profile
fun main() {
val list = listOf<Int>(1, 2, 3, 2, 1)
println(
"the pivot index is: ${
searchIndex(
list,
0,
list.size - 1,
null,
{ mid -> mid == 0 || mid == list.size - 1 },
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.interaction.InteractionSource
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.PressInteraction
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface