上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页

2018年3月20日

摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2018-03-20 10:43 codingEskimo 阅读(97) 评论(0) 推荐(0) 编辑

2018年2月21日

摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai 阅读全文
posted @ 2018-02-21 12:50 codingEskimo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 思路: 这道题因为只有一对,所以可以用hashmap,需要注意的是,数字可能有重复, eg.[1,2,2,3,4] target = 4. 所以最好的办法就是把剩下的放进去。 这样如果有重复,没关系,把现在的index和已经放进去的index返回即可。 阅读全文
posted @ 2018-02-21 11:44 codingEskimo 阅读(92) 评论(0) 推荐(0) 编辑

2018年2月14日

摘要: Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 are s 阅读全文
posted @ 2018-02-14 11:48 codingEskimo 阅读(112) 评论(0) 推荐(0) 编辑

2018年2月2日

摘要: There is a building of n floors. If an egg drops from the k th floor or above, it will break. If it's dropped from any floor below, it will not break. 阅读全文
posted @ 2018-02-02 12:35 codingEskimo 阅读(390) 评论(0) 推荐(0) 编辑
摘要: A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i 阅读全文
posted @ 2018-02-02 12:08 codingEskimo 阅读(244) 评论(0) 推荐(0) 编辑

2018年2月1日

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2018-02-01 12:29 codingEskimo 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given a knight in a chessboard n * m (a binary matrix with 0 as empty and 1 as barrier). the knight initialze position is (0, 0) and he wants to reach 阅读全文
posted @ 2018-02-01 11:54 codingEskimo 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 76. Longest Increasing Subsequence 116. Jump Game 603. Largest Divisible Subset 611. Knight Shortest Path 630. Knight Shortest Path II 116. Jump Game 阅读全文
posted @ 2018-02-01 11:44 codingEskimo 阅读(105) 评论(0) 推荐(0) 编辑

2017年6月16日

摘要: This question is standard level BSF. From this question, we can see the best time to mark a node is the time when it is added to a queue. 阅读全文
posted @ 2017-06-16 07:36 codingEskimo 阅读(111) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页

导航