Dear Sir/Madam, If I have a list let say a:=[[1,2,3],[4,5],[6,7,8,9],[10,11,12,],[13,14],[15,16,17,18]];
I want to find the list of maximum length in it, or collection of list of max length from above For instance, result:=[[6,7,8,9],[15,16,17,18]]; how can i find this result? here is one algorithm that I tried, I know something is wrong in here. this is why it is not compiling >Comparison:=function(a) >local i,k; >k:=[]; > for i in [1..Length(a)] do > repeat > if Length(a[i])<Length(a[i+1]) then > Add(k,a[i+1]); > else > Add(k,a[i]); > fi; > until (i+1)=Length(a); > od; >return k; >end; Many thanks. Kind regards Siddiqua _______________________________________________ Forum mailing list Forum@mail.gap-system.org http://mail.gap-system.org/mailman/listinfo/forum