假设一个List里面包含多个List:
<"apple", "banana">,<"ball", "pen"> <"apple", "orange">, <"grape", "orange">,<"paper","ruler">,<"ink","pen">
如何将每个List进行重复比对,并将含有相同元素的List合并,最后形成一个新的List>:
<"apple","banana","orange","grape">,,<"paper","ruler">
也可理解为:"A=B","C=D","A=E","F=E","G=H","I=D" =>
"A=B=E=F","C=D=I","G=H"
请诸位不吝指教,谢谢!
翻过高山走不出你
相关分类