Consider this nested array
In each subarray in which 1 appears, a 2 appears. You might say that 1's presence is dependent on 2's presence. The converse is not true, as 2 appears in a subarray without 1. Additionally, 3 is dependent on 2, and 4 is dependent on 1 and 2.
Given a list of lists of positive integers (in whatever I/O form is most convenient for you) remove only the integers which are dependent on integers larger than themselves. In other words, for every integer A that is dependent on an integer B, and B>A, remove A.
You may assume:
Positive integers only
Input will not be nested further than one level, as in the example above
No integer will appear more than once in a given subarray
Subarrays will be sorted (increasing or decreasing, whichever is more convenient as long as you state in your answer)
No empty arrays anywhere in input
in: [[1,2,4],[1,2,3],[2,3]] out: [[2,4],[2,3],[2,3]] in: [[3,4],[5,6]] out: [,] in: [[1,2,3],[1,2,3,4],[2,3,4]] out: [,[3,4],[3,4]] in: [] out: [] in: [[2,12],[2,13],[2,14]] out: [[2,12],[2,13],[2,14]]
Shortest code wins :)