伪Python爱好者
追小虫的蚂蚁
追小虫的蚂蚁
展开
-
选择排序(Python版)
/* 选择排序 */def selection_sort(list): # Loop through the entire array for curPos in range( len(list) ): # Find the position that has the smallest number # Start with the curr原创 2013-06-15 18:31:29 · 709 阅读 · 0 评论 -
插入排序(Python版)
/* */def insertion_sort(list): # Start at the second element (pos 1). # Use this element to insert into the # list. for keyPos in range(1, len(list)): # Get the value of the原创 2013-06-15 18:34:20 · 552 阅读 · 0 评论