# 第九周ARTS总结
# Algorithm
207ms | 15.11% Run time
38.4MB | 99.95% Memory
public int maxArea(int[] height) {
int max = 0;
for (int i = 0; i < height.length - 1; i++) {
for (int j = i + 1; j < height.length; j++) {
int temp = (j - i) * Math.min(height[i], height[j]);
if (temp > max) {
max = temp;
}
}
}
return max;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# Review
note:
- Don’t Reinvent the Wheel
- Choose Libraries Wisely
- Sit, Take a Cup of Coffee and Read More Code
- For God’s Sake, Maintain Proper Coding Standards
- You Need ProGuard, Yes, You Need It!
- Use a Proper Architecture
- User Interface Is like a Joke, If You Have to Explain It, It’s Bad
- Analytics Is Your Best Friend
- Be a Marketing Ninja
- It’s Time to Optimize Your App
- Save More Than 5 Hours Every Week with Gradle Builds
- Test, Test and When You Are Done, Test Again!
- Android Fragmentation is a Devil in Disguise
- Start using Git, Today!
- Make it Difficult for the Hackers
- Develop On a Low-End Device
- Invest in Learning Design Patterns
- It’s Time to Give Back
# Tip
- 可通过一个常量来一键切换正式、测试环境。只需要环境中的每一个常量都依赖于这个常量即可。该常量推荐使用枚举类型
# Share
暂无内容