摘要:
1、跳台阶/楼梯 public class Solution { public int jumpFloor(int target) { int p = 1, q = 1; //和自下而上的方法使用相同的循环结构 for(int i = 2; i <= target; i++) { int temp 阅读全文
摘要:
给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。 方法1:暴力求解(超时) import java.util.*; public class Solution { /** * max water * @param arr int整型一维数组 the 阅读全文