![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
文章平均质量分 66
hansegod
这个作者很懒,什么都没留下…
展开
-
求包含所有颜色的最小子串
求包含所有颜色的最小子串原创 2015-11-09 22:37:16 · 483 阅读 · 0 评论 -
堆排序(首元空)
public class HeapSort { public void Adjust(int[] a,int i,int size){ int lchild = 2*i; int rchild = 2*i+1; int max=i; if(i<=size/2){ if(lchilda[max]) max=lchild; if(rchilda[max])原创 2015-11-09 21:52:33 · 307 阅读 · 0 评论 -
求数组中最大和子串类问题
public class maxsub { /* * 基于的性质: 1.对于全负的元素,找到最大值即可 * 2.对于最大子串和大于0的,可证明最大子串中任意前缀串大于0 * * 算法:依次计算累加和,当累加和大于原累加和时记录最大值相关信息,当累加和小于零时,由下一元素重新累加 */ static int getmaxsub(int[] a) throws Exce原创 2015-11-09 21:49:20 · 397 阅读 · 0 评论 -
判断序列是否为合法出栈
import java.util.Stack; public class isStackOrder { public static boolean isOrder(final int[] push,final int[] pop){ if(null==push&&null==pop) return true; else if(null==push||null==pop) r原创 2015-11-12 23:56:23 · 556 阅读 · 0 评论 -
快排
-原创 2015-11-14 18:40:16 · 310 阅读 · 0 评论