摘要:
public class Binarysearch { public static int rank(int key,int[] a) { return rank(key,a,0,a.length-1); } public static int rank(int key,int[] a,int lo 阅读全文
posted @ 2020-02-06 20:32
清明道人
阅读(543)
评论(0)
推荐(0)
摘要:
递归有三个基本点: 1.递归总有一个最简单的情况。即边界或者跳出递归的条件语句; 2.递归总是尝试解决一个规模更小的问题; 3.递归尝试解决的父问题和子问题之间不因该有交集; 以下是几个递归代码://斐波那契数列 import edu.princeton.cs.algs4.StdOut; publi 阅读全文
posted @ 2020-02-06 15:31
清明道人
阅读(412)
评论(0)
推荐(0)
摘要:
import edu.princeton.cs.algs4.*; public class No_1_1_13 { public static void main(String[] args) { int m=4; int n=3; int [][] a = new int[m][n]; for(i 阅读全文
posted @ 2020-02-06 13:20
清明道人
阅读(656)
评论(0)
推荐(0)

浙公网安备 33010602011771号