Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-27 06:24:03
阅读次数:
127
CREATE TABLE employees_demo( employee_id NUMBER(6), first_name VARCHAR2(20), last_name VARCHAR2(25)CONSTRAINT emp_last_name_nn_demo NOT NULL, email VA...
分类:
数据库 时间:
2015-06-27 06:22:16
阅读次数:
135
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
Note: next()...
分类:
其他好文 时间:
2015-06-26 18:11:51
阅读次数:
116
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:
移动开发 时间:
2015-06-26 18:03:05
阅读次数:
108
C语言打印100以内的质数
#include
int main() {
int number;
int divisor;
for( number = 3; number <= 100; number += 2 ) {
for( divisor = 3; divisor <= number; divisor += 2 ) {
if( number % div...
分类:
编程语言 时间:
2015-06-26 18:02:53
阅读次数:
109
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:
其他好文 时间:
2015-06-26 17:58:21
阅读次数:
101
Big NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5857Accepted Submission(s): 4093点我Proble...
分类:
其他好文 时间:
2015-06-26 17:42:32
阅读次数:
118
chage功能:设定用户密码时效格式:chage 参数 number user常用参数:-m 设置修改密码的最小天数-M 两次修改密码相距的最大天数-d 指定密码最后修改的日期-l 设置密码过期后,锁定账号的天数-E 设置账号的过期日期,如果为0,立即过期;如果为-1,永不过期。-W 设置密码过期前...
分类:
其他好文 时间:
2015-06-26 14:53:50
阅读次数:
102
1.变量转换看起来很简单,但据我所看到的,使用构造函数,像Array()或者Number()来进行变量转换是常用的做法。始终使用原始数据类型(有时也称为字面量)来转换变量,这种没有任何额外的影响的做法反而效率更高。 1 var myVar = "3.14159", 2 3 str = ""+ my....
分类:
编程语言 时间:
2015-06-26 13:19:56
阅读次数:
102
Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11’ has binary represent...
分类:
其他好文 时间:
2015-06-26 12:54:20
阅读次数:
104