Dropbox Deduplication test

It works by breaking files into blocks. Each of these blocks is hashed. Only blocks that are not yet known are uploaded to the server when syncing. Check : Dropbox...

Lowest Common Ancestor | Binary Lifting

What is LCA? In graph theory and computer science, the lowest common ancestor (LCA) of two nodes v and w in a tree or directed acyclic graph (DAG) T is...

Sparse tables

What are sparse tables? Data structure that allows range queries Can answer most queries in O(log N) But can answer Range Minimum Queries in O(1) An idempotent operation can be...

Simple script to hack during contests

This is a simple shell script to hack during codeforces/topcoder rounds. your_code.cpp should be your code, victim_code.cpp should be victim’s code. Write test case generator in test.py and run this...

Save a file in vim without root permission

This happens lot of times. You open Vim to edit a system file, do some changes, and :wq. We won’t be able to save a file due to permission issues....