Refresh to get another 5 random questions

Orienting Graphs

Show that for every graph there is an orientation of the edges such that for every vertex the out-degree and in-degree differ by at most 1.


Geometric median of a graph

Given the adjacent matrix of a connected acyclic graph. Let the weights of all its edges are 1. Define the geometric median of the graph as the node v such ...


Find the peak entry

Given an array A with n distinct entries, for some index p between 1 and n, the values in the array entries increase up to position p in A and ...


Binary matrices with boundary filled by 1

Given a binary matrix A, i.e. each entry is either 1 or 0, design an algorithm to find a complete set
{A1, A2, ..., Ak} of sub-matrices of A ...


Arrangement of blocks

You are given N blocks of height 1…N. In how many ways can you arrange these blocks in a row such that when viewed from left you see only L ...