Skip to content

Instantly share code, notes, and snippets.

View ivan-moto's full-sized avatar

Ivan Moto ivan-moto

View GitHub Profile
# https://github.com/samoshkin/tmux-config
# ==========================
# === General settings ===
# ==========================
set -g default-terminal "screen-256color"
set -g history-limit 20000
set -g buffer-limit 20
set -sg escape-time 0
@ivan-moto
ivan-moto / ShiftedBinarySearch.java
Created January 19, 2018 04:41
Given a sorted, rotated collection, find an element in it.
/**
* Given a sorted, rotated collection, find an element in it.
* Rotated defined as elements shifted x to the right.
* Example:
* sorted array: [1, 2, 3]
* rotated x = 2: [2, 3, 1]
*/
public final class ShiftedBinarySearch {
public static void main(String... args) {