ARTS - Week Six

用户头像
shepherd
关注
发布于: 2020 年 06 月 29 日
ARTS - Week Six

Algorithm

Problem

  1. Jump Game

Solution

class Solution {
public boolean canJump(int[] nums) {
if (nums == null) return false;
int canReachableIndex = nums.length - 1;
for (int i = nums.length - 1; i >= 0; i-- ) {
if (nums[i] + i >= canReachableIndex) {
canReachableIndex = i;
}
}
return canReachableIndex == 0;
}
}

Review

Artical

How browsers work - Behind the scenes of modern web browsers

Link

http://taligarsiel.com/Projects/howbrowserswork1.htm

Note

The main flow

Resolve DNS -> Request Page -> Tokenize the response -> Parsing HTML to construct the DOM tree -> Render tree construction -> Layout of the render tree -> Painting the render tree.

Not part of render Tree

  • Head

  • display: none;

  • postion: absolute;

  • postion: relative;

Tips

Chained ternary operator

const age = 60
age > 50
? age > 70
? console.log('you are getting really old')
: console.log('you are getting between 50 and 70')
: console.log('you are bellow 30')



Share

Artical

4 Things Emotionally Intelligent People Don’t Do

Link

https://medium.com/personal-growth/4-things-emotionally-intelligent-people-dont-do-24ea6ea53992

Summary

  1. Stop criticizing others.

  2. Stop worrying about the future.

  3. Stop ruminating on the past.

  4. Stop expecting too much of others.



用户头像

shepherd

关注

还未添加个人签名 2020.05.13 加入

还未添加个人简介

评论

发布
暂无评论
ARTS - Week Six