摘要: 面试亚麻 的时候就败在这里。 每个数字生成的概率是相等的。 阅读全文
posted @ 2018-01-28 04:54 HisonSanDiego 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 从 一 string 中找出所有能组成target string的个数。比如catcdeaht, 找能组成cat的个数 阅读全文
posted @ 2018-01-22 13:44 HisonSanDiego 阅读(115) 评论(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 阅读(75) 评论(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 阅读(236) 评论(0) 推荐(0) 编辑
摘要: the original point is considered as the (0,0); 阅读全文
posted @ 2018-01-17 14:49 HisonSanDiego 阅读(239) 评论(0) 推荐(0) 编辑
摘要: input是一个arraylist,里面每一个element是一个pair,studentid和他的一个score。code就是要把这个list里面的所有学生的所有分数都读进去 然后计算每一个学生最高5个分数的平均值 然后output一个map key是id value是平均分. 阅读全文
posted @ 2018-01-17 13:33 HisonSanDiego 阅读(141) 评论(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 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 这是亚麻的OA 题。 一个滑动窗遍历数组,求滑动窗再每个时刻的和 阅读全文
posted @ 2018-01-17 07:54 HisonSanDiego 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 亚麻 的OA题 代码在leetcode 测试通过; leetcode 链接 https://leetcode.com/problems/longest-palindrome/description/ 阅读全文
posted @ 2018-01-16 15:12 HisonSanDiego 阅读(142) 评论(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 阅读(128) 评论(0) 推荐(0) 编辑