- 博客(5)
- 收藏
- 关注
原创 数组面试题之统计
question: Count smaller elements on right sideeg : [4,12,5,6,1,34,3,2] o/p [3,5,3,3,0,2,1,0]
2012-02-28 08:05:32 430
原创 MySQL数据库常用命令
1)进入命令提示符 mysql -u [username] -p 2)查看数据库列表 show databases; 3)打开数据库 use [database_name] 4)查看表列表 show tables; 5)执行脚本文件 mysql -u[username] -p[password] [database_name] 6)重定向表查询输
2012-02-26 18:23:10 471
原创 数组面试题之序列
1. QUESTION: Given an int array which might contain duplicates, find the largest subset of it which form a sequence. Eg. {1,6,10,4,7,9,5} then ans is 4,5,6,7 answer 1. Create an array 'TempArray
2012-02-16 21:33:46 662
原创 数组面试题之矩阵
1. QUESTION: Given an n x n matrix, where every row and column is sorted in increasing order. Given a number x, how to decide whether this x is in the matrix. The designed algorithm should have linear
2012-02-16 21:27:12 1352
原创 数组面试题之子数组(subarray)
1. QUESTION: Given an array, subarray size k and a number ssum, find the number of subarrays of size k that sum up to ssum. ANSWER: 1) sum the first k element from array. 2) Start a loop from k+1
2012-02-16 20:56:54 1363
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人