摘要: 方法 时间复杂度 空间复杂度 Stable 冒泡排序(Bubble Sort) O(n) — O(n^2) O(1) yes 选择排序(Selection Sort) O(n^2) — O(n^2) O(1) no 插入排序(Insertion Sort) O(n) — O(n^2) O(1) ye 阅读全文
posted @ 2016-04-02 12:41 Joyce-Lee 阅读(306) 评论(0) 推荐(0) 编辑
摘要: http://www.geeksforgeeks.org/rearrange-a-string-so-that-all-same-characters-become-at-least-d-distance-away/ Given a string and a positive integer d. 阅读全文
posted @ 2016-04-02 11:53 Joyce-Lee 阅读(498) 评论(0) 推荐(0) 编辑