Skip to content

Instantly share code, notes, and snippets.

View korotkevics's full-sized avatar
🇨🇭
Morges, Switzerland

Sándor Korotkevics korotkevics

🇨🇭
Morges, Switzerland
View GitHub Profile
@korotkevics
korotkevics / gist:16405e47d746f35085e3ff81f0616ea0
Created March 22, 2018 23:23 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
# -*- mode:python; -*-
#
# Copyright 2016 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@korotkevics
korotkevics / equals-hash-tostring.java
Created April 26, 2018 12:19 — forked from rocketraman/equals-hash-tostring.java
Example of JDK7+ Objects equals, hash and Guava 18+ toString implementations
import com.google.common.base.MoreObjects;
import java.util.Objects;
public class Address {
...
@Override
public boolean equals(Object obj) {
@korotkevics
korotkevics / .gitconfig
Created June 11, 2018 16:27 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
st = status