回复: 2
跳转到指定楼层
上一主题 下一主题
收起左侧

SignalFx面经

全局:

2016(1-3月) 码农类General 硕士 全职@SignalFx - 内推 - 技术电面  | | Fail | 应届毕业生

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

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

x
一家湾区的startup, CTO是个华人
电面,直接上code
  1. package Signalfx;

  2. public class FindPosInLinkedList {
  3.         class Node {
  4.                 Node next;
  5.                
  6.         }
  7.        
  8.         Node find(Node head, double pos) {
  9.                 // 1 / (1 - POS);
  10.                 if (head == null || head.next == null) {
  11.                         return head;
  12.                 }
  13.                 if (pos < 0 || pos > 1) {
  14.                         return null;
  15.                 }
  16.                 Node fast = head;
  17.                 Node slow = head;
  18.                 int count = 1;
  19.                 while (fast != null) {
  20.                         double num = pos * count;
  21.                         if (num >= 1) {
  22.                                 slow = slow.next;
  23.                                 num = num - 1;
  24.                         }
  25.                         fast = fast.next;
  26.                         count++;
  27.                 }

  28.                 return slow;
  29.         }

  30. }

  31. /*
  32. * V [] -> [] -> [] -> [] -> [] ^
  33. *
  34. * //pos = 0, return head //pos = 1, return tail //pos = 0.5 return middle //pos
  35. * = 0.4, 3 node list, return 2nd node //pos = 0.9800033284, 2 node list, return
  36. * 2nd node //pos = 0.9800033284, 100 node list, return 98th node
  37. *
  38. * //null, odd, even, 1000000, pos: -1, 10000, {0.1 0.9899993333, } Node
  39. * find(Node head, double pos) { // 1 / (1 - POS); if (head == null || head.next
  40. * == null) { return head; } if (pos < 0 || pos > 1) { return null; } Node fast
  41. * = head; Node low = head; int count = 1; while (fast != null) { int num = pos
  42. * * count; if (num >= 1) { slow = slow.next; num = num - 1; } fast = fast.next;
  43. * count++; }
  44. *
  45. * return slow; }
  46. *
  47. * 1 / 2 = 0.5 / 1
  48. *
  49. * F S
  50. *
  51. *
  52. *
  53. *
  54. * F S 1 1 2 1 3 2 4 2 5 3 -
  55. *
  56. * //Given the head of a linked list, return the middle of that list //null,
  57. * odd, even, 1, 2, 10000000 Node findMid(Node head) { if (head == null ||
  58. * head.next == nulll) { return head; } Node fast = head; Node slow = head;
  59. * while (fast != null && fast.next != null) { fast = fast.next.next; slow =
  60. * slow.next; }
  61. *
  62. * return slow; }
  63. */
复制代码
onsite:
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
016-4-13 04:38):
看了面经,请加分啊~

评分

参与人数 4大米 +51 收起 理由
laviniatx + 3 很有用的信息!
IwasReloading + 5
玛奇朵肉丝 + 3 感谢分享!
夏虫不知雪花 + 40

查看全部评分


上一篇:Cretio 面经
下一篇:Snapchat OA 4.12
🔗
谎言之躯 2016-4-13 07:52:18 | 只看该作者
全局:
楼主投的他家哪个职位?
回复

使用道具 举报

全局:
我前几天收到这家HR在linkedin上的信息。感觉做的东西是很有意思,不过产品设计有点欠缺,特别是UI这一块。
不知道今后有没有前景
回复

使用道具 举报

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

本版积分规则

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