/** * Remove element from a list * * @param list * input list * @param e * particular element to be removed */
privatestaticvoidremoveElements(ArrayList<Integer>list,Integere){inti=0;while(i<list.size()&&list.get(i)==e){list.remove(i);i++;}//Processlastelement
i=list.size()-1;if(list.get(i)==e)list.remove(i);}
Last edit: Duy Dinh 2013-06-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Last edit: Duy Dinh 2013-06-13