注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 tktrung 于 2022-11-22 10:34 编辑
电面在Karat,安排周末,60分钟,总体感觉很好·,面试官也很nice(毕竟他们赚100美元一个小时啊)。两天后通知VO。走过路过求加米啊
首先5分钟互相介绍, 就扯一下
API设计提:订单系统, 每订单有多种item,数量不同,client可以 发订单,查看所有订单,消除订单,按item搜索。要按RESTful format来写
Follow up:cache,authentication
Coding:
Q1. Write a function that takes two users' browsing histories as input and returns the longest contiguous sequence of URLs that appears in both.
Sample input:
user0 = ["/start", "/green", "/blue", "/pink", "/register", "/orange", "/one/two"]
user1 = ["/start", "/pink", "/register", "/orange", "/red", "a"]
user2 = ["a", "/one", "/two"]
user3 = ["/pink", "/orange", "/yellow", "/plum", "/blue", "/tan", "/red", "/amber", "/HotRodPink", "/CornflowerBlue", "/LightGoldenRodYellow", "/BritishRacingGreen&qu [(0, 0), (1, 0), (1, 1), (2, 1)]
OR [(0, 0), (0, 1), (1, 1), (2, 1)]
find_word_location(grid1, word3) => [(5, 0)]
find_word_location(grid1, word4) => [(0, 4), (1, 4), (2, 4)] OR [(0, 4), (1, 4), (1, 5)]
find_word_location(grid1, word5) => [(4, 5), (5, 5), (6, 5)]
find_word_location(grid1, word6) => [(6, 4), (6, 5)]
find_word_location(grid1, word7) => [(5, 2), (5, 3), (5, 4), (5, 5)]
find_word_location(grid1, word8) => [(4, 1), (4, 2), (4, 3)]
find_word_location(grid2, word9) => [(0, 0)]
Complexity analysis variables:
r = number of rows
c = number of columns
w = length of the word |