注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
两轮店面,第一轮没写对,思路错了(后来发现是裂口原题),感谢第一轮中国大哥高抬贵手,又安排了第二轮。但第二轮很扯,不知道是不是听说我写过前端,出了个从来没见过的题,直接交了个白卷,还请知道思路的题友指点一二。
第一轮题目如下:
// This is the text editor interface.
// Anything you type or change here will be seen by the other person in real time.
//call stack profiling,
/*
logs
enter func1 ts1
enter func2 ts2
exit func2 ts3
exit func1 ts4
question, what is exclusive time used by a function (e.g fnc1)
func1 ts4 - ts1 - ( ts3 - ts2)
input list of logs, records enter/exits time of funcitons
output willn(msg) { console.log(`got "${msg}", happyBirthdayGreet should have been called once and was called ${greetingCalled} time(s)`) bd('Anne', 31, function(msg) { console.log(`got "${msg}", happyBirthdayGreet should have been called twice and was called ${greetingCalled} time(s)`) }) })})%希望对准备面试的有所帮助!
|