注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 laifan_steven 于 2022-11-15 17:04 编辑
OA一共8道题,5题是multiple choice,3题coding, 给了48小时,点开后开始倒计时。只能选c++/c#/java,苦死我这个写纯C的了,要从syntax学起。
OA已经过了,等拿到offer了再回来还愿。
1. virtual function (all fuctions in Java should be considered virtual by default)
a. can be re-implemented in a derived class
b. is a function for which different derived classes can have different implementations
c. is a funciton for which a derived class must provided a new implementation
d. is a function whose existence in a class will prevent instiation of that格左边是人名,右边是罗马数字,人名相同的情况下按照罗马数字排序。
就是简单地把字符串split开来再排序就好了,罗马数字转10进制的方法可以再leetcode上找到。
8. coding
最短路径。麻烦的点是要自己handle输入输出,还有一些constraints。
输入的第一行是一个edge list, 你要把它解出来塞进一个graph。
然后第二行是你的goal,给你起点终点和allowedTime。
graph是undirected weighted graph,直接上dijkastra's alg就好了。
要注意的点是,它要你handle error,要细读下题目,它自带的test case目测不齐,说不定有额外的用例来筛人。 |