Monday, October 31, 2011

An array is given consisting of real integers , can hav repeatative elements , Now u need to find K partitions whose union will hav all the elements of the array , but the intersection of any pair of cannot hav K elements in common.

Example:- 
Array- 1 1 2  2 3 1 4 3 5 

For K=3 the partition are :- 
(1 2 3) (1 5 2) (1 4 3) 


cann't be :- (1 2 3)(3 1 2)(1 4 5)

No comments :