随笔分类 -  Algorithom

Sorting Algorithms in Java Language
摘要:插入排序: package org.rut.util.algorithm.support; import org.rut.util.algorithm.SortUtil;/** * @author treeroot * @since 2006-2-2 * @version 1.0 */public class InsertSort implements SortUtil.Sort{ ... 阅读全文
posted @ 2006-12-19 14:59 peter he 阅读(216) 评论(0) 推荐(0)
How to find out the odd charactor?
摘要:Question: there are 2n+1 charactors which have n paris of same char. how to find out the odd char in Time O(n), Space O(1)?Algorithom:Firstly, We should focus on the odd char. If we know which one is ... 阅读全文
posted @ 2006-11-28 09:45 peter he 阅读(391) 评论(0) 推荐(0)