摘要: 【题目描述】 Given an array contains N numbers of 0 ..N, find which number doesn't exist in the array. 给出一个包含 0 ..N中N个数的序列,找出0 ..N中没有出现在序列中的那个数。 【题目链接】 www. 阅读全文
posted @ 2018-01-28 09:21 chimmychimmy 阅读(94) 评论(0) 推荐(0)
摘要: 【题目描述】 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not 阅读全文
posted @ 2018-01-27 08:09 chimmychimmy 阅读(76) 评论(0) 推荐(0)
摘要: 【题目描述】 Given an unsorted integer array, find the first missing positive integer. 给出一个无序的整数数组,找出其中没有出现的最小正整数。 【题目链接】 www.lintcode.com/en/problem/first- 阅读全文
posted @ 2018-01-26 08:22 chimmychimmy 阅读(93) 评论(0) 推荐(0)
摘要: 【题目描述】 There areNgas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it 阅读全文
posted @ 2018-01-25 08:21 chimmychimmy 阅读(86) 评论(0) 推荐(0)
摘要: 【题目描述】 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 给出二维平面上的n个点,求最多有多少点在同一条直线上。 【题目链接】 www.lint 阅读全文
posted @ 2018-01-24 08:42 chimmychimmy 阅读(87) 评论(0) 推荐(0)
摘要: 【题目描述】 Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in ZigZag-order. 给你一个包含mxn个元素的矩阵 (m行,n列), 求该矩阵的之字型遍历。 【题目链接】 w 阅读全文
posted @ 2018-01-21 07:45 chimmychimmy 阅读(88) 评论(0) 推荐(0)
摘要: 【题目描述】 Given n pieces of wood with lengthL[i](integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with 阅读全文
posted @ 2018-01-19 07:38 chimmychimmy 阅读(105) 评论(0) 推荐(0)
摘要: 【题目描述】 Given string A representative a positive integer which hasNdigits, remove anykdigits of the number, the remaining digits are arranged according 阅读全文
posted @ 2018-01-18 20:31 chimmychimmy 阅读(93) 评论(0) 推荐(0)
摘要: 【题目描述】 Say you have an array for which the ith element is the price of a given stock on day i. Notice Both n and m are 32-bit integers. 如果要将整数A转换为B,需要 阅读全文
posted @ 2018-01-17 15:09 chimmychimmy 阅读(109) 评论(0) 推荐(0)
摘要: 【题目描述】 Given a (decimal -e.g.3.72) number that is passed in as a string, return the binary representation that is passed in as a string. If the fracti 阅读全文
posted @ 2018-01-16 20:55 chimmychimmy 阅读(96) 评论(0) 推荐(0)