题目:跳跳游戏 难度:Medium 题目内容: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the arr ...
分类:
编程语言 时间:
2018-05-13 19:53:29
阅读次数:
227
题目描述 给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 判断你是否能够到达最后一个位置。 示例 1: 输入: [2,3,1,1,4] 输出: true 解释: 从位置 0 到 1 跳 1 步, 然后跳 3 步到达最后一个位置。 示例 2: 输 ...
分类:
其他好文 时间:
2018-05-13 17:58:28
阅读次数:
128
第5课 - 主引导程序的扩展(下) 1. 在 FAT12 根目录中查找目标文件 在前面课程的学习中,我们知道主引导程序有一个 512 字节的限制,如何突破这种限制呢?我们想到的办法是:再写一个程序(LOADER)放到存储介质中,在主引导程序中将该程序加载到内存中,并将控制权转交给该程序(jump)。 ...
分类:
其他好文 时间:
2018-05-10 23:38:46
阅读次数:
176
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim ...
分类:
其他好文 时间:
2018-05-07 19:55:17
阅读次数:
153
在前面的例子中,无论是/index跳转到index.jsp 还是/addProduct 跳转到showProduct.jsp,都是服务器跳转。 本例讲解如何进行客户端跳转 1.修改IndexController 首先映射/jump到jump()方法在jump()中编写如下代码:ModelAndVie ...
分类:
其他好文 时间:
2018-04-22 22:42:34
阅读次数:
199
类名:classPerson{publicvoidrun(Stringwho){System.out.println("Person::run()"+who);}publicvoidjump(Stringwho){System.out.println("Person::jump()"+who);}publicvoidrun(){System.out.println("Person::run()")
分类:
编程语言 时间:
2018-04-16 18:49:17
阅读次数:
161
一只青蛙想要过河。 假定河流被等分为 x 个单元格,并且在每一个单元格内都有可能放有一石子(也有可能没有)。 青蛙可以跳上石头,但是不可以跳入水中。给定石子的位置列表(用单元格序号升序表示), 请判定青蛙能否成功过河(即能否在最后一步跳至最后一个石子上)。 开始时, 青蛙默认已站在第一个石子上,并可 ...
分类:
其他好文 时间:
2018-04-16 13:03:20
阅读次数:
169
指针学的好搓啊。。为了加深了对指针的运用 循环队列用了指针 链队列用了引用,还有就是在一个地方卡了好久好久,20多个报错无法编译通过要不要这么狠哇。。。最后发现是case内定义了新的变量惹 case里最好不要定义新的变量,否则会出现error:jump to case label,解决办法让case ...
分类:
其他好文 时间:
2018-04-11 11:38:05
阅读次数:
181
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim ...
分类:
其他好文 时间:
2018-04-07 15:01:51
阅读次数:
194
45. Jump Game II 题目 解析 运用bfs的思想,更新每一层的start,end,判断是否到达数组结尾,返回bfs的层数 题目来源 "leetcode 10 lines C++ (16ms) / Python BFS Solutions with Explanations" Pytho ...
分类:
其他好文 时间:
2018-03-11 00:37:13
阅读次数:
156