[algogeeks] Help solving this problem

2015-11-27 Thread mohit choudhary
Given an undirected graph G = (V, E), for any subset of nodes S ⊆ V we can construct a graph Gs from G by removing all nodes in S together with their incident edges. In the critical node problem (CNP), we are given an integer 1 ≤ k ≤ |V | and need to find a subset S of size k such that the graph

Re: [algogeeks] direct i online round

2012-08-20 Thread mohit choudhary
Scan first array check repeated values as in example( rt_triangle(4, {0, -1, -1, 1}, {1, -2, 1, -2})) -1,-1 is repeated twice at indices in array respectively 1and 2. now in second y-axis array check values at indices given by first array (in above example these values are -2 and 1 respectively)