How do I store a set of paired numbers in java? Do I use lists or arrays or maybe something else?
eg. [ (1,1) , (2,1) , (3,5)]
If you're needing to avoid duplicates then a HashSet would be a good choice but it not then an ArrayList would work.
Class IntPair(){ int i; int j; } HashSet set = new HashSet();
or
ArrayList list = new ArrayList();