Skip to content

Instantly share code, notes, and snippets.

View dotslash's full-sized avatar
🍊
🍒

Sai Teja Suram dotslash

🍊
🍒
View GitHub Profile
@dotslash
dotslash / README
Last active August 29, 2015 14:14 — forked from utkarshl/README
In order to use segtree class defined above, you will need to create a datatype(a struct most likely), which will implement the function merge(). It can also additionally implement split, if you need to define the split operation.
A sample is shown as "struct segtree_node" in the code above.
The segtree has to be instantiated with this defined data type. For example,as
segtree<segtree_node> s;
You have to first call the init function of the class, which will take
int n=number of elements in your array,
node[] = your inital array,
identity = an element such that merge(y,identity) = merge(identity,y) = y for all y's.
@dotslash
dotslash / IO.java
Last active August 29, 2015 14:14 — forked from anonymous/IO.java
java snippets
package reuse;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
final class IO{
//Standard IO
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));;

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname