private static void addList(ArrayList<Node> list, ArrayList<Node> newList) {
		for (int i = 0; i < list.size(); i++) {
			if(list.get(i).getWeight() <= Config.size){
			if (!newList.contains(list.get(i))) {
				newList.add(list.get(i));
				if (table.containsKey(list.get(i).getWeight())) {
					if (!table.get(list.get(i).getWeight()).contains(
							list.get(i)))
						table.get(list.get(i).getWeight()).add(list.get(i));
				} else {
					ArrayList<Node> list2 = new ArrayList<Node>();
					list2.add(list.get(i));
					table.put(list.get(i).getWeight(), list2);
				}
			}
			}
		}
	}