📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 5
跳转到指定楼层
上一主题 下一主题
收起左侧

Indeed Karat面经

全局:

2022(4-6月) 码农类General 硕士 全职@indeed - Other - 技术电面 在线笔试 视频面试  | 😐 Neutral 😐 Average | Other | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
求大米啊求大米~~~!! 跪求大米

karat面试,自我介绍,先问了一些cs基础问题,我选的api/web 和 product issue。

然
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
:
  1. *
  2. We have some clickstream data that we gathered on our client's website. Using cookies, we collected snippets of users' anonymized URL histories while they browsed the site. The histories are in chronological order, and no URL was visited more than once per person.

  3. Write a function that takes two users' browsing histories as input and returns the longest contiguous sequence of URLs that appears in both.

  4. Sample input:

  5. /start


  6. user0 = ["/start", "/green", "/blue", "/pink", "/register", "/orange", "/one/two"]
  7. user1 = ["/start", "/pink", "/register", "/orange", "/red", "a"]
  8. user2 = ["a", "/one", "/two"]
  9. user3 = ["/pink", "/orange", "/yellow", "/plum", "/blue", "/tan", "/red", "/amber", "/HotRodPink", "/CornflowerBlue", "/LightGoldenRodYellow", "/BritishRacingGreen"]
  10. user4 = ["/pink", "/orange", "/amber", "/BritishRacingGreen", "/plum", "/blue", "/tan", "/red", "/lavender", "/HotRodPink", "/CornflowerBlue", "/LightGoldenRodYellow"]
  11. user5 = ["a"]
  12. user6 = ["/pink","/orange","/six","/plum","/seven","/tan","/red", "/amber"]

  13. Sample output:

  14. findContiguousHistory(user0, user1) => ["/pink", "/register", "/orange"]
  15. findContiguousHistory(user0, user2) => [] (empty)
  16. findContiguousHistory(user0, user0) => ["/start", "/green", "/blue", "/pink", "/register", "/orange", "/one/two"]
  17. findContiguousHistory(user2, user1) => ["a"]
  18. findContiguousHistory(user5, user2) => ["a"]
  19. findContiguousHistory(user3, user4) => ["/plum", "/blue", "/tan", "/red"]
  20. findContiguousHistory(user4, user3) => ["/plum", "/blue", "/tan", "/red"]
  21. findContiguousHistory(user3, user6) => ["/tan", "/red", "/amber"]

  22. n: length of the first user's browsing history
  23. m: length of the second user's browsing history

  24. */
  25. import java.io.*;
  26. import java.util.*;

  27. import javax.sound.sampled.SourceDataLine;

  28. public class Solution {
  29.   public static void main(String[] argv) {
  30.     String[] user0 = {"/start", "/green", "/blue", "/pink", "/register", "/orange", "/one/two"};
  31.     String[] user1 = {"/start", "/pink", "/register", "/orange", "/red", "a"};
  32.     String[] user2 = {"a", "/one", "/two"};
  33.     String[] user3 = {"/pink", "/orange", "/yellow", "/plum", "/blue", "/tan", "/red", "/amber", "/HotRodPink", "/CornflowerBlue", "/LightGoldenRodYellow", "/BritishRacingGreen"};
  34.     String[] user4 = {"/pink", "/orange", "/amber", "/BritishRacingGreen", "/plum", "/blue", "/tan", "/red", "/lavender", "/HotRodPink", "/CornflowerBlue", "/LightGoldenRodYellow"};
  35.     String[] user5 = {"a"};
  36.     String[] user6 = {"/pink", "/orange", "/six", "/plum", "/seven", "/tan", "/red", "/amber"};
  37.     //System.out.println(calculateClicksByDomain(counts));
  38.    
  39.    System.out.println(findContiguousHistory(user0, user1));
  40.   }
复制代码
求大米啊求大米~~~!! 跪求大米

评分

参与人数 3大米 +19 收起 理由
开水不开 + 1 赞一个
匿名用户-AFUIA + 17
xjh9981 + 1 很有用的信息!

查看全部评分


上一篇:雪花爆炸难fall intern OA
下一篇:亚麻 SDE 面经
地里匿名用户
🔗
匿名用户-Z0PPV  2022-6-18 07:47:57
今天刚面完,面的跟LZ同样的2道题,第一题parse string卡了我很久,导致没多少时间做2题,看来得redo了。。
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-L8BYW  2022-6-30 00:52:15 来自APP
樓主,請問ce的基礎問題都問了些什麼?謝謝
回复

使用道具 举报

全局:
匿名用户 发表于 2022-6-17 18:47
今天刚面完,面的跟LZ同样的2道题,第一题parse string卡了我很久,导致没多少时间做2题,看来得redo了。。 ...

想问下redo是什么意思?
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-Z0PPV  2022-7-27 13:55:46
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

🔗
hezitaohaha 2022-8-27 08:48:00 | 只看该作者
全局:
第二题是最长公共子序列变种,用二维dp做。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表