Give an integer array,find the longest increasing continuous subsequence in this array. An increasing continuous subsequence: Can be from right to lef ...
分类:
其他好文 时间:
2017-06-03 09:51:11
阅读次数:
178
There are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. T ...
分类:
其他好文 时间:
2017-06-03 09:50:40
阅读次数:
232
http://www.lintcode.com/zh-cn/problem/next-permutation-ii/# 原题 给定一个若干整数的排列,给出按正数大小进行字典序从小到大排序后的下一个排列。 如果没有下一个排列,则输出字典序最小的序列。 样例 左边是原始排列,右边是对应的下一个排列。 1 ...
分类:
其他好文 时间:
2017-06-03 00:48:50
阅读次数:
264
题目1 最小子数组 描述: 给定一个整数数组,找到一个具有最小和的子数组。返回其最小和。 注意事项 子数组最少包含一个数字 您在真实的面试中是否遇到过这个题? Yes 给定一个整数数组,找到一个具有最小和的子数组。返回其最小和。 注意事项 子数组最少包含一个数字 给定一个整数数组,找到一个具有最小和 ...
分类:
编程语言 时间:
2017-06-02 17:43:45
阅读次数:
308
原题描述: 你有两个用链表代表的整数,其中每个节点包含一个数字。数字存储按照在原来整数中相反的顺序,使得第一个数字位于链表的开头。写出一个函数将两个整数相加,用链表形式返回和。 您在真实的面试中是否遇到过这个题? Yes 原题描述: 你有两个用链表代表的整数,其中每个节点包含一个数字。数字存储按照在 ...
分类:
编程语言 时间:
2017-06-02 12:45:16
阅读次数:
428
Write an algorithm which computes the number of trailing zeros in n factorial. Example 11! = 39916800, so the out should be 2 Challenge O(log N) time ...
分类:
其他好文 时间:
2017-06-02 01:12:07
阅读次数:
178
Practice Makes Perfect! ...
分类:
其他好文 时间:
2017-06-02 00:56:44
阅读次数:
404
原题描述: 查找斐波纳契数列中第 N 个数。 所谓的斐波纳契数列是指: 前2个数是 0 和 1 。 第 i 个数是第 i-1 个数和第i-2 个数的和。 斐波纳契数列的前10个数字是: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 ... 题目分析: 开始的想法,通过递归实现输出f ...
分类:
编程语言 时间:
2017-06-01 14:37:47
阅读次数:
137
This blog talks about using dynamic programming to solve the famous back pack and its variant problems. BackPack I Given n items with size Ai, an inte ...
分类:
其他好文 时间:
2017-06-01 13:20:03
阅读次数:
182
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag ...
分类:
其他好文 时间:
2017-06-01 13:16:13
阅读次数:
234