Fork me on GitHub
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: /** * * @author gentleKay * Given a binary tree * Populate each next pointer to point to its next right node. If there is no next right node, the next 阅读全文
posted @ 2019-07-26 15:21 gentleKay 阅读(175) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given a roman numeral, convert it to an integer. * Input is guaranteed to be within the range from 1 to 3999. * * 给定一个罗马数字 阅读全文
posted @ 2019-07-26 15:12 gentleKay 阅读(128) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given two binary trees, write a function to check if they are equal or not. * Two binary trees are considered equal if the 阅读全文
posted @ 2019-07-26 15:09 gentleKay 阅读(121) 评论(0) 推荐(0) 编辑
摘要: /** * @author gentleKay * Determine whether an integer is a palindrome. Do this without extra space. * click to show spoilers. * Some hints: * Could n 阅读全文
posted @ 2019-07-25 15:55 gentleKay 阅读(121) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Say you have an array for which the i th element is the price of a given stock on day i. * If you were only permitted to c 阅读全文
posted @ 2019-07-25 15:54 gentleKay 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 结果: 结论:调用构造器的步骤: (1)调用基类的构造器。这个步骤会不断的反复递归下去,首先是构造这种层次结构的根,然后是下一层导出类,等等,直至最低层的导出类。 (2)按声明顺序调用成员的初始化方法。 (3)调用导出类构造器的主体。 阅读全文
posted @ 2019-07-24 16:56 gentleKay 阅读(188) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given a linked list, determine if it has a cycle in it. * Follow up: * Can you solve it without using extra space? * * 给定一 阅读全文
posted @ 2019-07-24 15:11 gentleKay 阅读(185) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given an integer, convert it to a roman numeral. * Input is guaranteed to be within the range from 1 to 3999. * * 给定一个整数,将 阅读全文
posted @ 2019-07-24 15:10 gentleKay 阅读(196) 评论(0) 推荐(0) 编辑
摘要: /** * @author gentleKay * Given n non-negative integers a1 , a2 , ..., an , where each represents a point at coordinate (i, ai ). * n vertical lines a 阅读全文
posted @ 2019-07-24 15:09 gentleKay 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 我们创建一个基类 Shape,然后Circle和Square 继承Shape。 第一种情况:Circle 和 Square 都不覆盖基类的方法。 结果: 第二种情况:Circle 覆盖基类方法 而 Square 不覆盖基类的方法。 结果: 第三种情况:Circle 和 Square 都覆盖基类的方法 阅读全文
posted @ 2019-07-24 11:00 gentleKay 阅读(287) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页