上一页 1 2 3 4 5 6 ··· 9 下一页

2016年1月14日

摘要: 第一种:Mapmap=newHashMap();Iteratoriter=map.entrySet().iterator();while(iter.hasNext()){Map.Entryentry=(Map.Entry)iter.next();Objectkey=entry.getKey();Ob... 阅读全文
posted @ 2016-01-14 03:59 一心一念 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 12 位运算 C语言是为描述系统设计的,因此它应该具有汇编语言所以完成的一些功能。C语言既有高级语言的特点,又具有低级语言的功能。因而具有广泛的用途和很强的生命力。12.1 位运算符和位运算运算符 含义& 按位与| 按位或^ 按位异或~ 取反> 右移说明:(1)位运算... 阅读全文
posted @ 2016-01-14 03:55 一心一念 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Given 3*n + 1 numbers, every numbers occurs triple times except one, find it.ExampleGiven [1,1,2,3,3,3,2,2,4,1] return 4ChallengeOne-pass, constant ex... 阅读全文
posted @ 2016-01-14 03:51 一心一念 阅读(137) 评论(0) 推荐(0) 编辑

2016年1月12日

摘要: The structure of Segment Tree is a binary tree which each node has two attributes start and end denote an segment / interval.start and end are both in... 阅读全文
posted @ 2016-01-12 05:23 一心一念 阅读(138) 评论(0) 推荐(0) 编辑

2016年1月9日

摘要: Implement a stack with min() function, which will return the smallest number in the stack.It should support push, pop and min operation all in O(1) co... 阅读全文
posted @ 2016-01-09 04:11 一心一念 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from th... 阅读全文
posted @ 2016-01-09 03:01 一心一念 阅读(103) 评论(0) 推荐(0) 编辑

2016年1月8日

摘要: Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.ExampleGivenn= 3, your program should return all 5 unique B... 阅读全文
posted @ 2016-01-08 05:09 一心一念 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given n, how many structurally unique BSTs (binary search trees) that store values 1...n?ExampleGiven n = 3, there are a total of 5 unique BST's.1 ... 阅读全文
posted @ 2016-01-08 04:56 一心一念 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find a continuous subarray where the sum of numbers is the biggest. Your code should return the index of the first number and ... 阅读全文
posted @ 2016-01-08 04:14 一心一念 阅读(131) 评论(0) 推荐(0) 编辑

2016年1月6日

摘要: Implement pow(x, n).NoteYou don't need to care about the precision of your answer, it's acceptable if the expected answer and your answer 's differenc... 阅读全文
posted @ 2016-01-06 06:51 一心一念 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页

导航