注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
一个没听过的公司给发了OA,岗位是Software Engineer Intern, Messaging Team,OA邮件里岗位是:(Backend/Fullstack) SE Intern,用的平台是Hired Assessment
时长1小时14分钟,14分钟是7道选择,1小时是1道Coding。
选择题7道,限时2分钟一道,点了答案就直接跳转下一道(我好恨😠)
1.Which of the following operations is faster in a linked list than an array?
A.Remove the first element
B.Add an element to the end
C.Swap two elements
D.I don't know
2.There’s a REST resource on the server with the URL: domain.com/document/1 and we want to update the resource. Which of the following requests would we use to update the document:
A.A POST to domain.com/document/1 with the updated resource as the body
B.A PUT to domain.com/document/1 with the updated resource as the body √
C.A POST to domain.com/document with the updated resource as the body
D.A PUT to domain.com/document/1 with just the fields that have been updated as the body
E.I don't know.
3.Site A has a microservice that serves only a single REST endpoint from a single application server connected to a small datab小时(真是菩萨),1题。
Given a string, s, find the length of the longest substring that contains no repeated characters.
Example input: s: "nndNfdfdf"
Example Output: 4
Explanation: "ndNf" is the longest substring within "nndNfdfdf" that contains no repeated characters, and its length is 4 characters.
我自己的做法是用双指针left right,用一个HashMap<Character, Integer>记录字符和出现的最新位置,s.charAt(right)不重复时往Map里加,重复时更新最大长度,left更新为s.charAt(right)在map里的位置+1,然后更新map(char, right)最新位置。
补充内容 (2023-03-18 21:37 +08:00):
Updates: 拒了 |