public ListNode removeElements(ListNode head, int val) {
		if (head == null)
			return null;
		ListNode start = head;
		ListNode cur = head;
		while (cur != null && cur.val == val) {
			cur = cur.next;
			start = cur;
		}
		if (cur == null)
			return null;
		ListNode pre = cur;
		cur = cur.next;
		while (cur != null) {
			if (cur.val != val) {
				pre.next = cur;
				pre = cur;
			}
			cur = cur.next;
		}
		pre.next = cur;

		return start;
	}