I have a List of elements and I need to pick the element which have the maximum or minimum for the third element and the first and second must be equal e.g.
list={{0,2,1}, {0,2,2},{0,2,3},{0,3,0},{1,2,0},{2,2,0},{2,2,1}}
to ouput
min={{0,2,1}, {2,2,0},{0,3,0},{1,2,0}} or max={{0,2,3},{2,2,1},{0,3,0},{1,2,0}}
Thanks
{0, 2, 3}
appear inmin
? And the second{0, 2, 3}
inmax
is a typo? $\endgroup$