public void removeDuplicates(Node<AnyType> headNode, int method)
	{
		if(method==1)
		{
			ArrayList<AnyType> list = new ArrayList<AnyType>();
			Node<AnyType> prev = null;
			
			while(headNode!=null)
			{
				if(list.contains(headNode.data))
				{
					prev.Next = headNode.Next;
				}
				else
				{
					prev = headNode;
					list.add(headNode.data);									
				}
				headNode = headNode.Next;
			}
		}
		else if(method==2)
		{
			if(headNode==null) return;
			
			Node<AnyType> prev = headNode;
			Node<AnyType> current = headNode.Next;
			
			while(current!=null)
			{
				Node<AnyType> runner = headNode;
				while(runner!=current)
				{
					if(runner.data==current.data)
					{
						Node<AnyType> tmp = current.Next;
						prev.Next = tmp;
						current = tmp;
						break;
					}
					runner = runner.Next;
				}
				if(runner==current)
				{
					prev = current;
					current = current.Next;
				}
			}
		}
	}