[LeetCode Weekly Contest 29][2017/04/23] 第17周 Binary Tree Tilt (3) Array Partition I (6) Longest Line of Consecutive One in Matrix (8) Find the Closest Palindrome (10) 第一题: 563. Binary Tree Tilt [easy] 别人写几行,我写的非常啰嗦==.树后序遍历.代码是重写过的. Given a binary tr…
Contest 71 () Contest 72 () Contest 73 (2019年1月30日模拟) 链接:https://leetcode.com/contest/weekly-contest-73 结果:2/4,会做第一题和第三题,第二题和第四题不会做. [788]Rotated Digits(第一题 4分)(谷歌tag) 给了一个 good number 的定义,X is a good number if after rotating each digit individually…
Contest 121 (题号981-984)(2019年1月27日) 链接:https://leetcode.com/contest/weekly-contest-121 总结:2019年2月22日补充的报告.当时不想写.rank:1093/3924,AC:2/4.还是太慢了. [984]String Without AAA or BBB(第一题 4分)(Greedy, M) 给了两个数字,A 代表 A 个 ‘A’, B 代表 B 个‘B’ 在字符串里面.返回一个可行的字符串,字符串中包含 A…
为了简化匿名内部类的代码,具体定义: 例如将9.内部类中的匿名内部类例子: 原来代码: //Main.java public class Main { public static void main(String[] args){ ProcessArray ay = new ProcessArray(); int[] array = {1, 2, 3}; ay.process(array, new AddCommand() { @Override public void process(int[…