- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 leecode_210 Course Schedule II
There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as
2016-05-31 04:05:20 303
原创 leecode_208 Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith methods.class TrieNode {public: // Initialize your data structure here. char c; unordered_map sub; TrieNode() {
2016-05-28 15:03:02 164
原创 leecode_201 Bitwise AND of Numbers Range
Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4.class Solution {public: int rangeBitwiseAnd(int m, int n) { int i=0; while(m!=n){
2016-05-27 04:12:59 232
原创 leecode_200 Number of Islands
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assu
2016-05-26 14:18:40 191
原创 leecode_199 Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the following binary tree, 1
2016-05-25 11:57:59 271
原创 java表达式问题 找零问题
看下面的代码:public class p2 { public static void main(String[] args) { // TODO Auto-generated method stub double d1=2.00; double d2=1.10; System.out.println(d1-d2); System.out.println(200-110
2016-05-23 08:44:32 626
原创 java表达式问题 奇数性
先看下面的程序:public class p1 { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println(isOdd(1)); System.out.println(isOdd(-1)); } public static boolea
2016-05-23 08:26:08 741
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人