unlike other python files bitonic_sort.py Doesn't have any proper input statement :
a= []
n=int(input().strip())
foriinrange(n):
a.append(int(input().strip()))
up=1sort(a, n, up)
print("\n\nSorted array is")
foriinrange(n):
print("%d"%a[i])It's quit Confusing because user who haven't seen the code won't know what is the first input.
It should be written as :
user_input=input("Enter numbers separated by a comma:\n").strip()
unsorted= [int(item) foriteminuser_input.split(",")]
up=1sort(unsorted,len(unsorted), up)
print("\nSorted array is")
print(*unsorted, sep=",")This not only removes a loop but also makes to more understandable
unlike other python files
bitonic_sort.pyDoesn't have any proper input statement :It's quit Confusing because user who haven't seen the code won't know what is the first input.
It should be written as :
This not only removes a loop but also makes to more understandable