Skip to content

Instantly share code, notes, and snippets.

View melihaksoy's full-sized avatar
👻
weeeeeeee

Melih Aksoy melihaksoy

👻
weeeeeeee
View GitHub Profile
@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 30, 2023 18:05
Big O notation for java's collections

The book Java Generics and Collections has this information (pages: 188, 211, 222, 240).

List implementations:

                      get  add  contains next remove(0) iterator.remove
ArrayList             O(1) O(1) O(n)     O(1) O(n)      O(n)
LinkedList O(n) O(1) O(n) O(1) O(1) O(1)
@FrantisekGazo
FrantisekGazo / StatefulRecyclerView.java
Last active July 6, 2023 21:02
Retain & restore recycler view scroll position
package eu.f3rog.ui.custom;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
/**
@ph0b
ph0b / build.gradle
Last active February 12, 2023 07:45
sample build.gradle for generating split APKs per ABI
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig{
minSdkVersion 14
targetSdkVersion 21
versionCode 101