Problem Description For the k-th number, we all should be very familiar with it. Of course,to kiki it is also simple. Now Kiki meets a very similar pr ...
分类:
其他好文 时间:
2017-05-16 09:53:49
阅读次数:
205
Problem statement: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Have you met this question ...
分类:
其他好文 时间:
2017-05-15 23:52:55
阅读次数:
381
A. Tricky Sum(模拟) In this problem you are to calculate the sum of all integers from 1 to n, but you should take all powers of two with minus in the su ...
分类:
其他好文 时间:
2017-05-15 21:01:33
阅读次数:
268
Roy's friends has been spying on his text messages, so Roy thought of an algorithm to encrypt text messages. Encryption Algorithm is as follows:We say ...
分类:
编程语言 时间:
2017-05-15 14:21:44
阅读次数:
212
题目: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get ...
分类:
系统相关 时间:
2017-05-15 10:02:16
阅读次数:
300
Given an integer array of size n, find all elements that appear more than ? n/3 ? times. The algorithm should run in linear time and in O(1) space. 用的 ...
分类:
其他好文 时间:
2017-05-14 22:54:29
阅读次数:
321
根据吴恩达机器学习教程总结,在matlab、octave均可使用 Matlab进行标量运算 >> 5 + 5 ans = 10 >> 6 * 2 ans = 12 >> 3^2 ans = 9 >> 3/2 ans = 1.5000 变量赋值 >> a = 3 a = 3 赋值语句后面加; 可以不输 ...
分类:
其他好文 时间:
2017-05-14 10:35:32
阅读次数:
214
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2054 Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or p ...
分类:
其他好文 时间:
2017-05-13 20:08:51
阅读次数:
149
今天在练习一个小demo的时候,在localhost文件中出现了这样的notice,具体的原因和解决方法做如下分析。 题目:已知一个字符串如下,将其最后两项转换为数组。 主要的思路:1. 先使用explode()函数将字符串进行分割,因该函数的结果会返回一个数组,所以分割的部分会独立的存入该数组中。 ...
分类:
Web程序 时间:
2017-05-13 19:01:14
阅读次数:
257