- 博客(8)
- 收藏
- 关注
原创 TopKElements和Hashmap的空间复杂度问题
hashmap的空间复杂度,比如,we need to find the top frequency word in an array,so we need to use hashmap then the space complexity is O(n).if we use brute force method,firstly,sort the array,it cost O(nlgn) ti
2016-03-09 12:19:53 2513
原创 Leetcode:195. Tenth Line以及管道命令pipeline
195. Tenth LineMy SubmissionsQuestionTotal Accepted: 9416 Total Submissions: 29373 Difficulty: EasyHow would you print just the 10th line of a file?For example, assume that f
2016-03-07 05:41:21 594
原创 Leetcode:BinaryTree level order Traversal and Zigzag traversal
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15,7},
2016-03-06 07:39:54 262
原创 USC CSCI 585 Specialization Hierarchy
Provide the means to: Support attribute inheritance Define a special supertype attribute known as the subtype discriminator Define disjoint/overlapping constraints and compete/partial cons
2016-03-03 08:30:23 1004
转载 sql having 语句
HAVING 子句在 SQL 中增加 HAVING 子句原因是,WHERE 关键字无法与合计函数一起使用。SQL HAVING 实例我们拥有下面这个 "Orders" 表:O_IdOrderDateOrderPriceCustomer12008/12/291000Bush
2016-03-02 13:09:55 554
转载 Group by and Having用法解析
Group By语句的意思就是很据(by)一定的规则进行分组(Group), 作用就是通过一定的规则将一个数据集化为若干个小区域,然后针对若干个小区域进行数据处理例如现在有这样一张表,每个部门有多少人 就需要用到这样一张表select DepartmentID as "部门名称" COUNT(*) as '个数' from BasicDepartment group
2016-03-02 12:04:54 1740
原创 LeetCode:181. Employees Earning More Than Their Managers
The Employee table holds all employees including their managers. Every employee has an Id, and there is also a column for the manager Id.+----+-------+--------+-----------+| Id | Name | Salary |
2016-03-01 10:10:01 332
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人