Consider a convex polygon with N vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a …

# Month: April 2014

Given a value N , if we want to build a wall of size 4xN and we have an infinite supply of bricks of size 1×4 and 4×1 , In …

A Fenwick tree or binary indexed tree is a data structure that was first used for data compression. It is often used for storing frequencies and manipulating cumulative frequency tables. …

Given an array A having n integers. We need to give an algorithm to find a contiguous subseqnence (A[i], A[i+1], …, A[j]) such that the sum of the elements in …