You are given a collection of files data in some format such that each record contains-
File name,
File size,
List of collections in which current exists
List of collections can have 0...n collections
Now each collection will be holding multiple files totalling to 'X' size.
You are given a number 'N', such that you have to find top 'N' collections in decreasing order of their sizes.
Here you can consider a collection of records which you need to process.
But for below example, I am trying to provide each record sequentially & not as a whole.
So it becomes a Producer/Consumer problem.
File name,
File size,
List of collections in which current exists
List of collections can have 0...n collections
Now each collection will be holding multiple files totalling to 'X' size.
You are given a number 'N', such that you have to find top 'N' collections in decreasing order of their sizes.
Here you can consider a collection of records which you need to process.
But for below example, I am trying to provide each record sequentially & not as a whole.
So it becomes a Producer/Consumer problem.
Producer
Consumer
TopNFileCollections
Please let me know your views.