Ministério da Educação
Brasil um país de todos
Personal tools
You are here: Home Members Tiago A. E. Ferreira Graduação Algoritmos e Estrutura de Dados Programas TesteOrdena.py
Navigation
Log in


Forgot your password?
 
Document Actions

TesteOrdena.py

by Tiago Alessandro Espinola Ferreira last modified 2009-09-10 06:28

Programa exemplo em python para testar a classe Ordena

Click here to get the file

Size 1 kB - File type text/python-source

File contents

from Ordena import Ordena

l=[5,3,2,7,1,9,8]
x=Ordena(l)
y=Ordena(l)
z=Ordena(l)

print "x"
print x
print "y"
print y
print "z"
print z

x.insertionSort()
y.mergeSort(0,len(l)-1)
z.heapSort()

print("\n ----- Ordenando ---- \n")

print "x"
print x
print "y"
print y
print "z"
print z

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: