Fork me on GitHub
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 我无意之间看到这个,哇,价值一个亿。难道我也要凭亿近人,多财多亿? 然而并没有,ahhhh emmmm。。。稍微的看了一下,了解一下代码,还是比较简单的,np ! 这样想想真的有点np!!! 附上参考博客:https://blog.csdn.net/b644ROfP20z37485O35M/arti 阅读全文
posted @ 2019-07-30 17:57 gentleKay 阅读(2211) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * You are climbing a stair case. It takes n steps to reach to the top. * Each time you can either climb 1 or 2 steps. In how 阅读全文
posted @ 2019-07-30 17:49 gentleKay 阅读(365) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * Given a binary tree, return the inorder traversal of its nodes' values. * For example: * Given binary tree{1,#,2,3}, 1 \ 2 阅读全文
posted @ 2019-07-30 17:41 gentleKay 阅读(137) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * Given a sorted array and a target value, return the index if the target is found. * If not, return the index where it woul 阅读全文
posted @ 2019-07-30 17:38 gentleKay 阅读(101) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * Given a binary tree, determine if it is height-balanced. * For this problem, a height-balanced binary tree is defined as a 阅读全文
posted @ 2019-07-29 17:51 gentleKay 阅读(205) 评论(0) 推荐(0)
摘要: 接口是实现多重继承的途径,而生成遵循某个接口的对象的典型方式就是工厂方法设计模式。这与直接调用构造器不同,我们在工厂对象上调用的是创建方法,而该工厂对象将生成接口的某个实现的对象。 代码: 通过这种方式,我们就可以创建不同的自行车来复用这段代码。 来自 Thinking For Java. 阅读全文
posted @ 2019-07-29 16:41 gentleKay 阅读(302) 评论(0) 推荐(0)
摘要: 关于接口的定义,它根本没有提供任何具体实现,它允许创建者确定方法名,参数列表和返回类型,但是没有任何方法体。接口只提供了形式,而未提供任何具体实现。 接口 interface 关键字,可以在前面添加public关键字(仅限于该接口在于其同名文件中被定义),如果不添加public关键字,则它只具有包访 阅读全文
posted @ 2019-07-29 16:33 gentleKay 阅读(1927) 评论(0) 推荐(0)
摘要: 我们需要知道,由于为抽象类创建对象是不安全的,所以我们会从编译器那里得到一条出错消息。这样,编译器会确保抽象类的纯粹性,我们不必担心会误用它。 编译器直接报错提醒。 看一下完整的例子: 阅读全文
posted @ 2019-07-29 16:15 gentleKay 阅读(159) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). * The robot can only move 阅读全文
posted @ 2019-07-29 10:46 gentleKay 阅读(226) 评论(0) 推荐(0)
摘要: /** * * @author gentleKay * Find the contiguous subarray within an array (containing at least one number) which has the largest sum. * For example, gi 阅读全文
posted @ 2019-07-29 10:26 gentleKay 阅读(177) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页