mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
added __future__ module
This commit is contained in:
parent
04d15692a8
commit
7ce559ecdd
|
@ -1,3 +1,7 @@
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
|
||||||
def heapify(unsorted,index,heap_size):
|
def heapify(unsorted,index,heap_size):
|
||||||
largest = index
|
largest = index
|
||||||
left_index = 2*index + 1
|
left_index = 2*index + 1
|
||||||
|
@ -31,5 +35,5 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
user_input = input_function('Enter numbers separated by coma:\n')
|
user_input = input_function('Enter numbers separated by coma:\n')
|
||||||
unsorted = [int(item) for item in user_input.split(',')]
|
unsorted = [int(item) for item in user_input.split(',')]
|
||||||
print heap_sort(unsorted)
|
print (heap_sort(unsorted))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user