上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 46 下一页

2015年1月11日

Combinations

摘要: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],... 阅读全文

posted @ 2015-01-11 00:46 luckygxf 阅读(169) 评论(0) 推荐(0) 编辑

2015年1月9日

Word Search

摘要: Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文

posted @ 2015-01-09 20:48 luckygxf 阅读(186) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted Array II

摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret... 阅读全文

posted @ 2015-01-09 15:21 luckygxf 阅读(122) 评论(0) 推荐(0) 编辑

2015年1月8日

Think in java备忘录

摘要: 1..new在内部类中的使用.new可以用使用外部类对象创建一个内部类,对象DotNew.java 1 package com.gxf.innerclass; 2 3 public class DotNew { 4 class InnerClass{ ... 阅读全文

posted @ 2015-01-08 12:39 luckygxf 阅读(180) 评论(0) 推荐(0) 编辑

2015年1月7日

Partition List

摘要: Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文

posted @ 2015-01-07 21:05 luckygxf 阅读(163) 评论(0) 推荐(0) 编辑

Decode Ways

摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文

posted @ 2015-01-07 19:01 luckygxf 阅读(169) 评论(0) 推荐(0) 编辑

2015年1月5日

Reverse Linked List II

摘要: Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No... 阅读全文

posted @ 2015-01-05 14:54 luckygxf 阅读(130) 评论(0) 推荐(0) 编辑

2015年1月3日

java enum

摘要: java枚举类型java枚举类型类似java中的普通类,编译后生成.class字节码文件。参考:http://www.cnblogs.com/frankliiu-java/archive/2010/12/07/1898721.htmlhttp://www.cnblogs.com/happyPawpa... 阅读全文

posted @ 2015-01-03 10:34 luckygxf 阅读(182) 评论(0) 推荐(0) 编辑

2014年12月31日

Binary Search Tree Iterator

摘要: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next... 阅读全文

posted @ 2014-12-31 22:43 luckygxf 阅读(345) 评论(0) 推荐(0) 编辑

C++中的static关键字(转)

摘要: 原出处:http://blog.csdn.net/hackbuteer1/article/details/7487694C++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。前者应用于普通变量和函数,不涉及类;后者主要说明static在类中的作用。一、面... 阅读全文

posted @ 2014-12-31 09:44 luckygxf 阅读(148) 评论(0) 推荐(0) 编辑

上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 46 下一页

导航