c source code to remove subset transactions form text file

Posted by user324887 on Stack Overflow See other posts from Stack Overflow or by user324887
Published on 2010-04-28T10:24:32Z Indexed on 2010/04/28 10:33 UTC
Read the original article Hit count: 252

Filed under:
|
|
|

I have a file containing data as follows

10 20 30 40 70
20 30 70
30 40 10 20
29 70
80 90 20 30 40
40 45 65 10 20 80
45 65 20

I want to remove all subset transaction from this file.

output file should be like follows

10 20 30 40 70
29 70
80 90 20 30 40
40 45 65 10 20 80

Where records like

20 30 70
30 40 10 20
45 65 20

are removed because of they are subset of other records.

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++