摘要:
【定义】 表示object的集合 generic class:可以用于多种object, 抽象类的具体实现: 【ArrayList】 动态添加,只能加Non-primitive type,要初始化长度。 【compare】记忆方法:BT1 用this,T02 用object comparable:比 阅读全文
posted @ 2018-10-18 22:02
苗妙苗
阅读(113)
评论(0)
推荐(0)
摘要:
通过关键字extends来创建一个类的子类。一个类通过关键字implements声明自己使用一个或者多个接口。 settext是根据数组新建的pets[1]object来的,对其调用抽象方法talk,数量上要输出dog object中的dogcount 阅读全文
posted @ 2018-10-18 20:52
苗妙苗
阅读(125)
评论(0)
推荐(0)
摘要:
[抄题]: You are given an array A of strings. Two strings S and T are special-equivalent if after any number of moves, S == T. A move consists of choosin 阅读全文
posted @ 2018-10-18 09:47
苗妙苗
阅读(142)
评论(0)
推荐(0)
摘要:
[抄题]: An array is monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A[i] <= A 阅读全文
posted @ 2018-10-18 08:48
苗妙苗
阅读(175)
评论(0)
推荐(0)
摘要:
[抄题]: Given a binary tree rooted at root, the depth of each node is the shortest distance to the root. A node is deepest if it has the largest depth p 阅读全文
posted @ 2018-10-18 07:56
苗妙苗
阅读(277)
评论(0)
推荐(0)