Skip to content

Instantly share code, notes, and snippets.

View imankitaman's full-sized avatar
🎯
Focusing

Ankit Aman imankitaman

🎯
Focusing
  • redBus
  • India
View GitHub Profile
@imankitaman
imankitaman / grokking_to_leetcode.md
Created October 6, 2024 06:31 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout android:layout_width="match_parent"
android:orientation="vertical"
android:id="@+id/ll_buttons_container"
android:layout_gravity="center"
@imankitaman
imankitaman / SplitInstallManager.kt
Created December 26, 2018 09:15
Install all features deferred.
/* Install all features deferred. */
private fun loadDynamicModules() {
if (splitInstallManager.installedModules.contains(moduleName)) {
loadActivityFeatureModule()
return
}
val request = SplitInstallRequest.newBuilder()
.addModule(moduleName)
.build()
@imankitaman
imankitaman / MainActivity.kt
Last active February 14, 2019 23:37
Access Dynamic Module from the parent module
package ankitaman.`in`.dynamicfeature
import android.content.Intent
import android.os.Build
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v4.app.Fragment
import android.util.Log
import android.view.View
import android.widget.Toast
SplitInstallSessionStatus.DOWNLOADING -> {
// In order to see this, the application has to be uploaded to the Play Store.
Log.d(TAG, "Downloading $name")
}
SplitInstallSessionStatus.REQUIRES_USER_CONFIRMATION -> {
Log.d(TAG, "Downloading $name")
}
SplitInstallSessionStatus.INSTALLED -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// Updates the app's context with the code and resources of the