Shortcut for chapter specific information

Showing posts with label insertion sort python version. Show all posts
Showing posts with label insertion sort python version. Show all posts

Wednesday, April 27, 2011

Daily Practice 20110427(b)

Insertion sort 48 - 51 (python) : only 51 is good.  48: I don't even know the syntax. 49: syntax error, there is no i-- in python.  50, I don't realize the python use 0-based array!
Selection sort 17-19 (python) : only 19 is good.  17: don't realize python has zero-based array. 18: can't remember the cause.

It's good to exercise in unfamiliar language.  Python's code is significantly shorter than perl and C even in simple programs such as insertion and selection sorts.

Thursday, April 21, 2011

31,32 writing of insertion sort (python)

Ah.  Got the and syntax is incorrect.  But finally get back to the game of python.
Ah.  Training yourself on one move can be frustrating.