What do you want to do in 'removeDuplicates()' exactly ?
How big is your array ?
Why not reducing it at array's first creation immediately ?
BTW, seems as second loop has wrong limit, if you want generate/test all pairs
Code: Select all
for j=i+1 to tos