Skip to content

Instantly share code, notes, and snippets.

View gasperlf's full-sized avatar
🎮
Focusing

Lewis Florez Renza gasperlf

🎮
Focusing
View GitHub Profile
@isopropylcyanide
isopropylcyanide / ObjectMapperUtil.java
Created June 20, 2018 10:20
Nested Property Object Mapper. Using reflection, takes an object and returns a map<string, string> where key is all the properties (nested inclusive) and value is the object value
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.IntStream;
import org.apache.commons.lang3.ClassUtils;
@FedericoPonzi
FedericoPonzi / big-o-java-collections.md
Last active December 18, 2024 16:07
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)