Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
quck sort
x=[1,2,3,5,6,7,8,9,10] s=0 e=len(x)-1 mid=(0+len(x)-1)//2 ele=int(input()) for j in range(0,len(x)): mid=(s+e)//2 if x[mid]==ele: print("Element ("+str(x[mid])+") found at posititon ="+str(mid)) break elif ele>x[mid]: s=mid+1 e=len(x)-1 elif ele<x[mid]: s=0 e=mid-1 if x[mid]!=ele: print("Element not found")
run
|
edit
|
history
|
help
0
Цифроразряды в разных системах счисления
IP Networks splitting calculator
inverse matrix gauss jordan
Lcm and hcf
Ej2_python_204676887
Leibnitz Series To Estimate Pi
числа близнецы
python, attributes, setter and getter the pythonic way (V2)
GINGERMANZ
lower and upper alphabets checker