Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图森未来 一面 #29

Open
Amybiubiu opened this issue Apr 6, 2021 · 2 comments
Open

图森未来 一面 #29

Amybiubiu opened this issue Apr 6, 2021 · 2 comments
Labels

Comments

@Amybiubiu
Copy link
Owner

Amybiubiu commented Apr 6, 2021

  • 自我介绍
  • 项目中的那一部分对你来说比较难?
  • 你用过哪些 es6 语法?
  • 介绍一下箭头函数?最内层的 this 捕获那一层的?箭头函数的缺点?
  • 介绍一下 promise?promise.all 和 promise.race 的区别?
  • http 和 https 的区别?除了加密传输外还有吗?
  • react 组件的消息传递?
  • react 周边的用过什么?react 单向数据流,你知道是什么吗?redux 用过吗?
  • http 状态码
  • http 缓存?E-Tag 和 Last-Modified 区别?它们是怎么生成的?
  • 一道 js 题目 写一个函数A,它接受一个函数参数B,B 可能依据参数生成随机数,也可能是无参数生成随机,调用A后返回一个函数C,函数C参数相同的返回结果总是一致的。(我又忘记了 obj key 和 value 的写法了,太说不过去了,自我反思。懒得写代码了)
  • 一道 算法题 括号匹配(我没有写 map 代码丑陋)
@Amybiubiu
Copy link
Owner Author

Amybiubiu commented Apr 7, 2021

  • 由于写了 c++ ,对 js object 和 map 语法傻傻分不清,放几个链接
  • E-Tag 的生成
    维基百科:Common methods of ETag generation include using a collision-resistant hash function of the resource's content, a hash of the last modification timestamp, or even just a revision number.
  • 括号匹配那道题,再次吐槽,是谁给我的勇气写出那么丑的代码??!!
// let str = '{[()]}';
let str = '{{]]()'

const resolution = (s) => {
    let map = new Map();
    map.set('[',']');
    map.set('{', '}');
    map.set('(', ')');
    let stack = [];
    for(let i = 0; i < s.length; i++){
        if(map.get(s[i])){
            stack.push(map.get(s[i]));
        }else{
            if(stack.length){
                if(stack.pop() != s[i]){
                    return false;
                }
            }else{
                return false;
            }
        }
    }
    if(stack.length){
        return false;
    }else{
        return true;
    }
}
console.log(resolution(str));

@Amybiubiu
Copy link
Owner Author

又见图森,受到了粗暴对待。我:面试官现在是不是很急呢?那我也可以不问别的问题了。面试官:是的,我很急。等等一些别的……感觉最近口条变得很差,也可能一直都很差,哭了😭,以后要多写文档多理思路。

  • 又问了 react hook 使用起来🈶️什么限制
  • 记忆化函数的作用
  • 怎么路由跳转??
  • 泛型?
  • 一些别的重复的,不列了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant