phantomuserland icon indicating copy to clipboard operation
phantomuserland copied to clipboard

need performance test

Open dzavalishin opened this issue 9 years ago • 2 comments

For #249 for example

dzavalishin avatar Feb 25 '16 17:02 dzavalishin

Recursive Python function to solve tower of hanoi

def TowerOfHanoi(n , from_rod, to_rod, aux_rod): if n == 1: print "Move disk 1 from rod",from_rod,"to rod",to_rod return TowerOfHanoi(n-1, from_rod, aux_rod, to_rod) print "Move disk",n,"from rod",from_rod,"to rod",to_rod TowerOfHanoi(n-1, aux_rod, to_rod, from_rod)

Driver code

n = 4 TowerOfHanoi(n, 'A', 'C', 'B')

A, C, B are the name of rods

dzavalishin avatar Oct 22 '19 09:10 dzavalishin

Add switch - display or not, to test just func calls or graphics too Need some code to test allocations - JSON? Test 100 JSON parsings! And generate JSON from Phantom objects

dzavalishin avatar Oct 22 '19 09:10 dzavalishin