H大面試題

2021.08.19

分享一下剛才面試的題目. 新加坡公司

第一題
/* Flatten an array:
Input: [1, 2, [3, 4, [5, 6]]];
Output: [1, 2, 3, 4, 5, 6];
/

Ans:可以搭配 recursion for loop Array.isArray 這三個 topic

第二題
/ Given a string s containing just the characters
'(', ')', '{', '}', '[' and ']',
determine if the input string is valid.

An input string is valid if:

  1. Open brackets must be closed by the same type of brackets.
  2. Open brackets must be closed in the correct order.

Example:
Input: s = "()"
Output: true

Input: s = "()[]{}"
Output: true

Input: s = "(]"
Output: false

Input: s = "([)]"
Output: false

Input: s = "{[]}"
Output: true

Constraints:
• 1 <= s.length <= 10^4
• s consists of parentheses only '()[]{}'.
*/

第三題
https://drive.google.com/file/d/1eqIqidPS5b00ZV_P1JtxC95_wIZK79-J/view

4.什麼是event loop
5.怎麼做

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

2021.08.31

為了避免新進前端工程師 會為了面試而刷題
我想在這邊提供一個 resource 來自 frontend master
把書中屬於前端的 "基本" 都走過一遍
再把剩餘的時間拿去刷題

https://frontendmasters.com/books/front-end-handbook/2019/

2021.09.07

  1. how to search term inside article
  2. how to sync modal position with the select term
  3. how to fetch api with debouncing tech