
Algorithm
「已注销」
这个作者很懒,什么都没留下…
展开
-
Algorithm:BST(Binary Search Tree)构造
二叉搜索树的构造#include //BSTreetypedef struct BSTree{ int m_nValue; struct BSTree *m_left; struct BSTree *m_right;}Tree;Tree *CreateBSTree(int *array_list,int nLength);void CreateBSTree(原创 2013-11-24 21:40:19 · 975 阅读 · 0 评论 -
[算法学习]20150409.1.插入排序
Python实现插入排序# -*-coding: utf-8 -*-import randomimport stringdef insert_sort(array): ''' The implementation of insertation sort ''' for i in range(1, len(array)): key = array[原创 2016-04-09 12:59:31 · 454 阅读 · 0 评论 -
[算法学习]20150414.3.快排
快排实现# -*-coding: utf-8 -*-import stringimport randomdef adjustArray(array, l, r): """quick sort one step""" if not array or l < 0 or r < 0 or l > r: return i, j = l, r base =原创 2016-04-14 16:12:34 · 566 阅读 · 0 评论