Google Interview Question

Two Sum, Number of connected components, etc.