📣 Back to School开学季 - VIP通行证5折优惠!蓝莓、Offer多多同步优惠
查看: 3847| 回复: 12
跳转到指定楼层
上一主题 下一主题
收起左侧

[找工就业] 大家最近有michaels的sde面试吗

全局:

2020(10-12月)-CS本科+3-5年 | Other|德州地区 码农类General全职@michaels

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

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

x
大家最近有michaels的sde面试吗? 一起交流一下

上一篇:Amazon intern海投一个月没消息 如何follow up
下一篇:简历求狠批,救救孩子吧~
推荐
mchzh 2020-10-9 10:47:37 | 只看该作者
全局:
分享一个遇到的题目,没有遇到难题,算幸运,它家是不是越来越难了
public class TestSolution {
    public static void main(String[] args) {
//        int[] res = getPrimePair(6); ..
//        System.out.println(res[0] + " " + res[1]);. 1point 3 acres
//        res = getPrimePair(100);. 1point3acres
//        System.out.println(res[0] + " " + res[1]);
//        res = getPrimePair(23);
//        System.out.println(res[0] + " " + res[1]);

        ListNode first = new ListNode(1);
        first.next = new ListNode(7);
        first.next.next = new ListNode(9);
        first.next.next.next = new ListNode(4);
        first.next.next.next.next = new ListNode(6);
        first.next.next.next.next.next  = new ListNode(10);
        first.next.next.next.next.next.next = new ListNode(2);
        first.next.next.next.next.next.next.next = new ListNode(4);
        first.next.next.next.next.next.next.next.next = new ListNode(6);
        first.next.next.next.next.next.next.next.next.next = new ListNode(11);. .и
        first.next.next.next.next.next.next.next.next.next.next = new ListNode(10);
. 1point 3 acres
        ListNode second = new ListNode(9);
        second.next = new ListNode(20);
        second.next.next = new ListNode(2);
        second.next.next.next = new ListNode(4);
        second.next.next.next.next = new ListNode(20);
        second.next.next.next.next.next  = new ListNode(8);
        second.next.next.next.next.next.next = new ListNode(12);. 1point 3acres

        ListNode ret = longestMatching(first, second);
        while (ret != null) {
            System.out.println(ret.val);
            ret = ret.next;. .и
        }

    } ..
    private  static int[] getPrimePair(int even) {.--
        if (even%2 != 0) return new int[2];
        //int startPrim = 2;
        for (int startPrim = 2; startPrim <= even/2; startPrim++) {
            if (!isPrim(startPrim)) continue;
            int anotherPrim = even - startPrim;
            if (isPrim(anotherPrim)) {
                return new int[] {startPrim, anotherPrim};
            }
        }
        return new int[2];
    }
    private static boolean isPrim(int x) {
        int factor = 2;. From 1point 3acres bbs
        while (factor <= x/2) {. 1point3acres.com
            if (x%factor == 0) return false;
            factor++;
        }
        return true;
    }

//    First linked list: 1->7->2->4->6->10->2->4->6->8->10
//    Second linked list  9->20->2->4->6->8->12
//. .и
//    Print the longest matching elements 2, 4, 6, 8



    private static ListNode longestMatching(ListNode list1, ListNode list2) {
        int maxLen = 0;
        ListNode maxHead = null;
        while (list1 != null) {
            ListNode secondHead = list2;. Waral dи,
            while (secondHead != null && secondHead.val != list1.val) {
                secondHead = secondHead.next;. 1point3acres.com
            }
            ListNode firstHead = list1;
            int len = getLongest(firstHead, secondHead);
            if (maxLen < len) { ..
                maxLen = len;.
                maxHead = list1;
            }
            list1 = list1.next;
        }. 1point3acres.com
        ListNode ret = maxHead;
        for (int i = 0; i < maxLen-1; i++) {
            maxHead = maxHead.next;
        }
        maxHead.next = null;. 1point 3acres
        return ret;.google  и
    }
    private static int getLongest(ListNode first, ListNode second) {
        int count = 0;
        while (first != null && second != null && first.val == second.val) {
            count++;
            first = first.next;
            second = second.next;
        }
        return count;
    }
}
class ListNode {
    int val;
    ListNode next;
    public ListNode() {}
    public ListNode(int val) {-baidu 1point3acres
        this.val = val;
    }
}

评分

参与人数 1大米 +1 收起 理由
answeryoung + 1 给你点个赞!

查看全部评分

回复

使用道具 举报

推荐
rechardfei 2020-10-9 12:54:22 | 只看该作者
全局:
mchzh 发表于 2020-10-9 10:47
分享一个遇到的题目,没有遇到难题,算幸运,它家是不是越来越难了
public class TestSolution {
    pub ...

请问是今天面的吗?感觉最近换了波新题
回复

使用道具 举报

推荐
salinghang17 2020-11-14 10:57:06 | 只看该作者
全局:
mchzh 发表于 2020-10-9 10:47
-baidu 1point3acres分享一个遇到的题目,没有遇到难题,算幸运,它家是不是越来越难了.
public class TestSolution {
    pub ...
. check 1point3acres for more.
请问楼主Michales出结果了吗
回复

使用道具 举报

🔗
rechardfei 2020-10-7 08:28:40 | 只看该作者
全局:
楼主啥时候面?
回复

使用道具 举报

🔗
jerrygod 2020-10-7 11:19:29 | 只看该作者
全局:
楼主啥时候投的 我昨天刚找人内推 没收到面试
回复

使用道具 举报

全局:
刚刚面完 一道hard trap rain water II
回复

使用道具 举报

🔗
 楼主| feifeikuai 2020-10-9 10:12:20 | 只看该作者
全局:
谢谢您分享
回复

使用道具 举报

全局:
一样,感觉进入瓶颈期了
回复

使用道具 举报

🔗
 楼主| feifeikuai 2020-10-9 12:22:35 | 只看该作者
全局:
大家有最近面试的话 可以来私信我 一起交流

评分

参与人数 1大米 +3 收起 理由
mchzh + 3 楼主有WeChat或者邮箱吗

查看全部评分

回复

使用道具 举报

🔗
mchzh 2020-10-10 00:40:50 | 只看该作者
全局:
rechardfei 发表于 2020-10-9 12:54
请问是今天面的吗?感觉最近换了波新题

不是最近,是三周前了,换了新题的话大家应该多分享一下出来
回复

使用道具 举报

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

本版积分规则

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