上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 54 下一页
摘要: Write a function that add two numbers A and B. You should not use + or any arithmetic operators. 分析: 典型的Bit Operation. 阅读全文
posted @ 2016-07-06 02:21 北叶青藤 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm which computes the number of trailing zeros in n factorial. Have you met this question in a real interview? Yes Write an algorithm 阅读全文
posted @ 2016-07-06 02:16 北叶青藤 阅读(155) 评论(0) 推荐(0) 编辑
摘要: For an array A, if i < j, and A [i] > A [j], called (A [i], A [j]) is a reverse pair.return total of reverse pairs in A. For an array A, if i < j, and 阅读全文
posted @ 2016-07-06 02:01 北叶青藤 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Swap Nodes | Given a linked list, swap every two adjacent nodes and return its head. Example Given 1->2->3->4, you should return the list as 2->1->4-> 阅读全文
posted @ 2016-07-05 12:24 北叶青藤 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Given a list of non negative integers, arrange them such that they form the largest number. Notice The result may be very large, so you need to return 阅读全文
posted @ 2016-07-05 09:48 北叶青藤 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock I Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted t 阅读全文
posted @ 2016-07-05 09:14 北叶青藤 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2016-07-05 09:02 北叶青藤 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array of n integers, find the starting and ending position of a given target value. If the target is not found in the array, return [-1 阅读全文
posted @ 2016-07-05 08:56 北叶青藤 阅读(132) 评论(0) 推荐(0) 编辑
摘要: There are two sorted arrays A and B of size m and nrespectively. Find the median of the two sorted arrays. There are two sorted arrays A and B of size 阅读全文
posted @ 2016-07-05 07:55 北叶青藤 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Find all the keys of tree in range k1 to k2. i.e. print all x s 阅读全文
posted @ 2016-07-05 06:09 北叶青藤 阅读(198) 评论(0) 推荐(0) 编辑
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 54 下一页