Distinct list of lists, where lists contains same values but in different order

前端 未结 4 1152
傲寒
傲寒 2020-12-19 06:49

I got a list:

var list = new List>();

which could contain

list[0] = {1, 2, 3, 4}
lis         


        
4条回答
  •  时光说笑
    2020-12-19 07:34

    list[1] = list[1].Except(list[0]).ToList();
    

    This is the solution in the assumption that we need to remove the duplicate ints from the arrays list[0] and list[1]. Other answers are dealing with the case of removing arrays which contain the same set of ints.

提交回复
热议问题