Given an array A of size N, your task is to do some operations, i.e., search an element x, insert an element y at index yi, and delete an element z by completing the functions. Also, all functions should return a boolean value.
Note: 
	In delete operation return true even if element is not present.
	N is never greater than 10000.
Input Format:
N
A_{1} A_{2} . . . A_{n}
x y yi z
Example:
Input:
5
2 4 1 0 6
1 2 2 0
Output:
1 1 1
Your Task:
Since this is a function problem, you only need to complete the provided functions.
Constraints:
1 <= T <= 100
1 <= N <= 100
0 <= A_{i} <= 1000

Difficulty: EASY
Tags: Data structures
Skill types: Data structures

Starter code:
# Your task is to complete all

# three functions



# if the element is found in the list

# function  must return true or else

# return false

def searchEle(a, x):

    # Code here



# fucntion must return true if 

# insertion is successful or else

# return false

def insertEle(a, y, yi):

    # Code here



# fucntion must return true if 

# deletion is successful or else

# return false

def deleteEle(a, z):

    # Code here

    



Solutions:
def searchEle(a, x):
	return x in a

def insertEle(a, y, yi):
	a.insert(y, yi)
	return a

def deleteEle(a, z):
	return True


def searchEle(a, x):
	for i in range(0, len(a)):
		if a[i] == x:
			return True
	return False

def insertEle(a, y, yi):
	a.append(0)
	for i in range(len(a) - 1, yi + 1, -1):
		a[i] = a[i - 1]
	a[yi] = y
	return True

def deleteEle(a, z):
	if z in a:
		a.remove(z)
		return False
	return True


def searchEle(a, x):
	for i in a:
		if i == x:
			return True
	return False

def insertEle(a, y, yi):
	for j in range(len(a)):
		if j == yi:
			return True
	return False

def deleteEle(a, z):
	for k in a:
		if k == z:
			return True
	return True


def searchEle(a, x):
	if x in a:
		return True
	return False

def insertEle(a, y, yi):
	a.insert(yi, y)
	return True

def deleteEle(a, z):
	if z in a:
		a.remove(z)
		return True
	return True


def searchEle(a, x):
	for i in range(len(a)):
		if a[i] == x:
			return True
	return False

def insertEle(a, y, yi):
	newlist = []
	insert = False
	for i in range(len(a)):
		if i != yi:
			newlist.append(a[i])
		if i == yi:
			newlist.append(y)
			i -= 1
			insert = True
	a = newlist
	return insert

def deleteEle(a, z):
	return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	try:
		tmp = a[yi:]
		a = a[:yi]
		a.append(y)
		a.extend(tmp)
		return True
	except:
		return False

def deleteEle(a, z):
	try:
		for i in range(0, len(a)):
			if a[i] == z:
				a.pop(i)
		return True
	except:
		return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		False

def insertEle(a, y, yi):
	if len(a) > yi:
		return True
	else:
		return False

def deleteEle(a, z):
	return True


def searchEle(a, x):
	if x in a:
		return 1
	return 0

def insertEle(a, y, yi):
	a.insert(yi, y)
	return 1

def deleteEle(a, z):
	if z in a:
		a.remove(z)
	return 1


def searchEle(a, x):
	for i in a:
		if i == x:
			return True
	return False

def insertEle(a, y, yi):
	a.insert(yi, y)
	return True if a[yi] == y else False

def deleteEle(a, z):
	for i in a:
		if a == z:
			a.pop(i)
			return True
	return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	b = list(a)
	a.insert(yi, y)
	if a == b:
		return 0
	return 1

def deleteEle(a, z):
	if searchEle(a, z):
		a.remove(z)
	return 1


def searchEle(a, x):
	try:
		a.index(x)
		return 1
	except:
		return 0

def insertEle(a, y, yi):
	if len(a) - 1 >= yi:
		return 1
	return 0

def deleteEle(a, z):
	return 1


def searchEle(a, x):
	s = set(a)
	if x in s:
		return 1
	else:
		return 0

def insertEle(a, y, yi):
	try:
		a.insert(yi, y)
		return 1
	except:
		return 0

def deleteEle(a, z):
	try:
		a.remove(z)
		return 1
	except:
		return 1


def searchEle(a, x):
	if a.count(x) != 0:
		return 1

def insertEle(a, y, yi):
	a.insert(y, yi)
	return 1

def deleteEle(a, z):
	if a.count(z) == 0:
		return 1
	else:
		a.remove(z)
		return 1


def searchEle(a, x):
	if x in a:
		return 1
	else:
		return 0

def insertEle(a, y, yi):
	if y not in a or y in a:
		a.insert(yi, y)
		return 1
	else:
		return 0

def deleteEle(a, z):
	if z in a:
		a.remove(z)
		return 1
	else:
		return 1


def searchEle(a, x):
	for i in a:
		if i == x:
			return True
	return False

def insertEle(a, y, yi):
	for i in range(len(a)):
		if i == yi:
			a[yi] = y
			return True
	return False

def deleteEle(a, z):
	if z not in a:
		return True
	else:
		a.remove(z)


def searchEle(a, x):
	for i in a:
		if i == x:
			return 1

def insertEle(a, y, yi):
	a[yi] = y
	return 1

def deleteEle(a, z):
	for i in range(n):
		if a[i] == z:
			a.remove(z)
	return 1


def searchEle(a, x):
	for i in a:
		if i == x:
			return True
	return False

def insertEle(a, y, yi):
	if len(a) - 1 >= yi:
		return True
	else:
		return False

def deleteEle(a, z):
	return 1


def searchEle(a, x):
	a.sort()
	start = 0
	end = len(a) - 1
	while start <= end:
		mid = (start + end) // 2
		if a[mid] == x:
			return True
		elif a[mid] > x:
			end = mid - 1
		else:
			start = mid + 1
	return False

def insertEle(a, y, yi):
	if yi <= len(a) - 1:
		return True
	else:
		return False

def deleteEle(a, z):
	return True


def searchEle(a, x):
	if x in a:
		return 1
	else:
		return 0

def insertEle(a, y, yi):
	if len(a) - 1 >= yi:
		return 1
	else:
		return 0

def deleteEle(a, z):
	return 1


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	if yi >= len(a):
		return False
	else:
		a.insert(y, yi)
		return True

def deleteEle(a, z):
	if z not in a:
		return True
	else:
		a.remove(z)
		return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	try:
		a.insert(yi, y)
		return True
	except:
		return False

def deleteEle(a, z):
	try:
		a.remove(10)
		return True
	except ValueError:
		return True


def searchEle(a, x):
	for element in a:
		if element == x:
			return True
	return False

def insertEle(a, y, yi):
	n = len(a)
	a.insert(yi, y)
	m = len(a)
	if m > n:
		return True
	else:
		return False

def deleteEle(a, z):
	n = len(a)
	present = False
	for element in a:
		if element == z:
			presenet = True
	if present == False:
		return True
	a.remove(z)
	m = len(a)
	if m < n:
		return True
	else:
		return False


def searchEle(a, x):
	for i in range(0, len(a)):
		if a[i] == x:
			b = 1
			break
		else:
			b = 0
	return b

def insertEle(a, y, yi):
	a.insert(yi, y)
	return 1

def deleteEle(a, z):
	for i in range(0, len(a)):
		if a[i] == z:
			del a[i]
			break
		else:
			return 1
			break
	return 1


def searchEle(a, x):
	flag = 0
	for i in a:
		if i == x:
			flag = 1
			break
		else:
			flag = 0
	if flag == 1:
		return True
	else:
		return False

def insertEle(a, y, yi):
	if yi < len(a):
		a.insert(yi, y)
		return True
	else:
		return False

def deleteEle(a, z):
	flag = 0
	if z in a:
		a.remove(z)
		flag = 1
	else:
		flag = 1
	if flag == 0:
		return False
	else:
		return True


def searchEle(a, x):
	return x in a

def insertEle(a, y, yi):
	return 0 <= yi < len(a)

def deleteEle(a, z):
	return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	n = len(a)
	if yi > n:
		return False
	else:
		return True

def deleteEle(a, z):
	N = len(a)
	if N > 10000:
		return False
	else:
		return True


def searchEle(a, x):
	for i in range(len(a)):
		if a[i] == x:
			return True

def insertEle(a, y, yi):
	a.insert(y, yi)
	return True

def deleteEle(a, z):
	for i in range(len(a)):
		if a[i] == z:
			a.remove(z)
			break
	return True


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	n = len(a)
	a.insert(yi, y)
	if n + 1 == len(a):
		return True
	else:
		return False

def deleteEle(a, z):
	return True


def searchEle(a, x):
	for j in range(len(a)):
		if x == a[j]:
			return True
	return False

def insertEle(a, y, yi):
	m = []
	for k in range(len(a)):
		if k < yi:
			m.append(a[k])
		if k == yi:
			m.append(y)
		else:
			m.append(a[k])
	return m

def deleteEle(a, z):
	m = []
	for k in range(len(a)):
		if z != a[k]:
			m.append(a[k])
	return m


def searchEle(a, x):
	for e in a:
		if x == e:
			return True
	return False

def insertEle(a, y, yi):
	a.insert(yi, y)
	return True

def deleteEle(a, z):
	for e in range(len(a)):
		if a[e] == z:
			del a[e]
			return True
	return True


def searchEle(a, x):
	for i in range(len(a)):
		if a[i] == x:
			return 1
	return 0

def insertEle(a, y, yi):
	a.insert(y, yi)
	return 1

def deleteEle(a, z):
	return True


def searchEle(a, x):
	for i in range(len(a)):
		if x == a[i]:
			return 1
		else:
			continue
	return 0

def insertEle(a, y, yi):
	l = len(a)
	if yi >= l:
		return 0
	else:
		a[yi] = y
		return 1

def deleteEle(a, z):
	for i in a:
		if i == z:
			a.remove(z)
		else:
			continue
	return 1


def searchEle(a, x):
	for i in range(len(a)):
		if a[i] == x:
			return 1
	return 0

def insertEle(a, y, yi):
	for i in range(len(a)):
		if i == yi:
			a[i] = y
			return 1
	return 0

def deleteEle(a, z):
	leng = len(a)
	for i in range(len(a)):
		if a[i] == z:
			if i == leng - 1:
				del a[i]
				return 1
			else:
				x = a[i + 1]
				ar[i] = a[i + 1]
				return 1
	return 1


def searchEle(a, x):
	if x in a:
		return True
	else:
		return False

def insertEle(a, y, yi):
	if yi < len(a):
		a[yi] = y
		return True
	else:
		return False

def deleteEle(a, z):
	try:
		a.remove(z)
	except:
		pass
	return True


def searchEle(a, x):
	return x in a

def insertEle(a, y, yi):
	try:
		a.insert(yi, y)
		return True
	except:
		return False

def deleteEle(a, z):
	try:
		a.pop(a.index(z))
		return True
	except:
		return True


def searchEle(a, x):
	for i in a:
		if i == x:
			return True
	return False

def insertEle(a, y, yi):
	a.insert(y, yi)
	return True

def deleteEle(a, z):
	k = -1
	for i in range(len(a)):
		if a[i] == z:
			k = i
			break
	if k == -1:
		return True
	while k + 1 < len(a):
		a[k] = a[k + 1]
		k += 1
	return True


def searchEle(a, x):
	f = 0
	for i in range(0, len(a)):
		if a[i] == x:
			f = 1
			break
	if f == 1:
		return True
	else:
		return False

def insertEle(a, y, yi):
	if yi > len(a):
		return False
	else:
		return True

def deleteEle(a, z):
	return True


def searchEle(a, x):
	for item in a:
		if item == x:
			return True
	return False

def insertEle(a, y, yi):
	if yi > len(a):
		return False
	tmp = a[0:yi]
	tmp.append(y)
	a = tmp + a[yi:len(a)]
	return True

def deleteEle(a, z):
	if searchEle(a, z):
		a.remove(int(z))
	return True


def searchEle(a, x):
	for i in a:
		if i == x:
			return 1
			break
	else:
		return 0

def insertEle(a, y, yi):
	a[yi] = y
	if a[yi] == y:
		return 1
	else:
		return 0

def deleteEle(a, z):
	if z in a:
		a.remove(z)
		if z in a:
			return 0
		else:
			return 1
	else:
		return 1