| 
 | 
back to boardWhy this problem is classified as Data Structure? I feel this is somewhat misleading as Data Structure isn't necessary for this problem. Re: Why this problem is classified as Data Structure? Agree. Solves with sort only. Re: Why this problem is classified as Data Structure? Sorting is good, yes.   But it can be solved with data stuctures too. I used map<int,set<int> > and it gave slow AC (0.75 sec).  |  
  | 
|