01 2018 档案

摘要:面试亚麻 的时候就败在这里。 每个数字生成的概率是相等的。 阅读全文
posted @ 2018-01-28 04:54 HisonSanDiego 阅读(132) 评论(0) 推荐(0)
摘要:从 一 string 中找出所有能组成target string的个数。比如catcdeaht, 找能组成cat的个数 阅读全文
posted @ 2018-01-22 13:44 HisonSanDiego 阅读(128) 评论(0) 推荐(0)
摘要:key point no special data structure, only operation trick listed as below. create a new node as a vritual head which will convinient for the operation 阅读全文
posted @ 2018-01-20 14:50 HisonSanDiego 阅读(82) 评论(0) 推荐(0)
摘要:2018 亚麻新题 http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=306458&extra=page%3D12%26filter%3Dsortid%26sortid%3D311%26sortid%3D311 第二题是个新题也 阅读全文
posted @ 2018-01-20 04:21 HisonSanDiego 阅读(254) 评论(0) 推荐(0)
摘要:the original point is considered as the (0,0); 阅读全文
posted @ 2018-01-17 14:49 HisonSanDiego 阅读(248) 评论(0) 推荐(0)
摘要:input是一个arraylist,里面每一个element是一个pair,studentid和他的一个score。code就是要把这个list里面的所有学生的所有分数都读进去 然后计算每一个学生最高5个分数的平均值 然后output一个map key是id value是平均分. 阅读全文
posted @ 2018-01-17 13:33 HisonSanDiego 阅读(151) 评论(0) 推荐(0)
摘要:这是亚麻的OA题, leetcode链接。https://leetcode.com/problems/course-schedule-ii/description/ the code listed here has passed all the test case in leetcode. 阅读全文
posted @ 2018-01-17 08:58 HisonSanDiego 阅读(187) 评论(0) 推荐(0)
摘要:这是亚麻的OA 题。 一个滑动窗遍历数组,求滑动窗再每个时刻的和 阅读全文
posted @ 2018-01-17 07:54 HisonSanDiego 阅读(296) 评论(0) 推荐(0)
摘要:亚麻 的OA题 代码在leetcode 测试通过; leetcode 链接 https://leetcode.com/problems/longest-palindrome/description/ 阅读全文
posted @ 2018-01-16 15:12 HisonSanDiego 阅读(149) 评论(0) 推荐(0)
摘要:这是亚麻的OA 题 这里的代码没有经过测试 Given a binary tree, find the subtree with maximum sum. Return the root of the subtree. another similar problem in leetcode : ht 阅读全文
posted @ 2018-01-16 13:42 HisonSanDiego 阅读(146) 评论(0) 推荐(0)
摘要:可能是2018 亚麻的OA题。 1.给字符串, 找出里面长度为N的, 并且里面字符只有一次重复的字串。例子:s: asdfaghjkjqoiiii;N=5. 返回asdfa ghjkj hjkjq jkjqo jqoii. 阅读全文
posted @ 2018-01-16 12:52 HisonSanDiego 阅读(159) 评论(0) 推荐(0)
摘要:亚麻的OA题 reverse words(leetcode有),要求尽可能time/space efficient 1,input的string的前后空格都要去除 2,若是input string 中的俩个word 之间有多个空格, 则仅需要保留一个。 Clarification: What con 阅读全文
posted @ 2018-01-15 15:14 HisonSanDiego 阅读(103) 评论(0) 推荐(0)
摘要:这是亚麻的OA题 问题描述 Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list such that it remains a cy 阅读全文
posted @ 2018-01-14 15:43 HisonSanDiego 阅读(137) 评论(0) 推荐(0)
摘要:这是亚麻的OA 题 带补充。。。。 阅读全文
posted @ 2018-01-14 15:38 HisonSanDiego 阅读(155) 评论(0) 推荐(0)
摘要:这是亚麻OA题 问题描述: 给一个 int[] arrival time, int[] Execution time, int q. 例子: 【0,1,4】 【5,2,3】 q=3. 输出的是average wait time 2.3333333 阅读全文
posted @ 2018-01-14 15:35 HisonSanDiego 阅读(323) 评论(0) 推荐(0)
摘要:这是亚麻2018 年新题的第一题: // find K distinct substring whithout duplication #include <iostream> // std::cout #include <algorithm> // std::make_heap, std::pop_ 阅读全文
posted @ 2018-01-14 14:30 HisonSanDiego 阅读(470) 评论(0) 推荐(0)
摘要:这是亚麻2018 年的新题2 阅读全文
posted @ 2018-01-14 14:28 HisonSanDiego 阅读(204) 评论(0) 推荐(0)
摘要:这是亚麻OA 题 阅读全文
posted @ 2018-01-14 14:18 HisonSanDiego 阅读(136) 评论(0) 推荐(0)