自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 怎样获得虚函数指针

先还是看看下面的代码:  #include  using namespace std;   class A { private:          int a;          int b; public:          virtual void vfun0()          {                    cout "A::vfun0"       

2014-04-18 11:02:21 296

原创 LeetCode - Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using extra space? #include using namespace std; struct Li

2014-02-20 15:14:56 386

原创 LeetCode - Reorder List

Reorder List Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,

2014-02-13 17:47:08 304

原创 LeetCode - Binary Tree Preorder Traversal

Binary Tree Preorder Traversal Given a  by Apps Hat Mini" style="color:rgb(0,136,204); background-color:transparent!important; border:none!important; display:inline!important; float:none!importan

2014-02-13 14:39:44 309

原创 LeetCode - Binary Tree Postorder Traversal

Binary Tree Postorder Traversal Given a  by Apps Hat Mini" style="color:rgb(0,136,204); background-color:transparent!important; border:none!important; display:inline!important; float:none!importa

2014-02-13 10:53:20 402

原创 LeetCode - LRU Cache

LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive)

2014-02-08 17:21:24 564

原创 LeetCode - Insertion Sort List

Insertion Sort List Sort a linked list using insertion sort. #include using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) { }

2013-12-11 14:35:49 388

原创 LeetCode - Evaluate Reverse Polish Notation

Evaluate Reverse Polish Notation Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another expressi

2013-12-10 17:39:28 641

原创 LeetCode - Max Points on a Line

Max Points on a Line Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. /** * Definition for a point. * struct Point { * int x; * int

2013-12-10 15:00:23 1255

原创 leetCode - Sort List

Sort List Sort a linked list in O(n log n) time using constant space complexity.#include using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), n

2013-12-06 14:54:54 462

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除