You're given an ancient book that unfortunately has a few pages in the wrong position, fortunately your computer has a list of every page number in order from ``1`` to ``n``.

You're supplied with an array of numbers, and should return an array with each page number that is out of place. Incorrect page numbers will not appear next to each other. Duplicate incorrect page numbers are possible.

Example:

```Given: list = [1,2,10,3,4,5,8,6,7]
```

``Return: [10,8]
``

Your returning list should have the incorrect page numbers in the order they were found.

Source: codewars | Difficulty: EASY
Tags: Data structures

Starter code: def find_page_number(pages):
	

Solutions:
def find_page_number(pages):
	(n, miss) = (1, [])
	for i in pages:
		if i != n:
			miss.append(i)
		else:
			n += 1
	return miss


def find_page_number(pages):
	n = [1]
	return [i for i in pages if n[-1] != i or n.append(n[-1] + 1)]


def find_page_number(p):
	(r, i) = ([], 0)
	while i < len(p):
		if p[i] != i + 1:
			r += [p.pop(i)]
			i -= 1
		i += 1
	return r


def find_page_number(pages):
	(n, res) = (1, [])
	for p in pages:
		if p == n:
			n += 1
		else:
			res.append(p)
	return res


def find_page_number(pages):
	wrong_pages = []
	last_page = 0
	for page_num in pages:
		if page_num == last_page + 1:
			last_page += 1
		else:
			wrong_pages.append(page_num)
	return wrong_pages


def find_page_number(pages):
	result = []
	for (j, page) in enumerate(pages):
		if page != j - len(result) + 1:
			result.append(page)
	return result


def find_page_number(p):
	res = []
	x = 1
	for v in p:
		if v != x:
			res.append(v)
		else:
			x += 1
	return res


def find_page_number(pages):
	r = []
	i = 0
	while i < len(pages):
		if pages[i] != i + 1:
			r.append(pages.pop(i))
			i -= 1
		i += 1
	return r


def find_page_number(pages):
	p = pages[:]
	x = 1
	r = []
	while p:
		if p[0] != x:
			r.append(p.pop(0))
		else:
			x += 1
			p.pop(0)
	return r


def find_page_number(pages):
	(arr, l) = ([], 0)
	for (i, p) in enumerate(pages, 1):
		if p != i - l:
			arr.append(p)
			l += 1
	return arr