![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
牛牛牛13
1
展开
-
数据结构中Java利用穷举法解决八皇后问题
具体代码如下 /** * 穷举法解八皇后问题 * @author Administrator * */ public class EightQueue { public static void main(String[] args) { int num=0; int[] a=new int[8]; for(a[0]=0;a[0]<8;a[0]++){原创 2017-05-02 19:52:33 · 1016 阅读 · 1 评论 -
数据结构中Java实现KMP与BF算法对比
/*java中的kmp算法 */public class KMPANDBF { public int indexBfCount(SeqString s,SeqString t,int begin){ int slen,tlen,i=begin,j = 0; int count = 0; slen =s.length(); tlen = t.length(); while (原创 2017-05-03 22:04:45 · 640 阅读 · 0 评论