摘要: 链表不是很熟,今天就写了增删改。如下。vs2013 编译通过 1 #include 2 using namespace std; 3 struct ListNode 4 { 5 int m_value; 6 ListNode * m_pnext; 7 }; 8 Li... 阅读全文
posted @ 2015-01-23 12:49 cbeigong 阅读(196) 评论(0) 推荐(0)
摘要: 1 Given an array of integers, find two numbers such that they add up to a specific target number. 2 3 The function twoSum should return indices of t... 阅读全文
posted @ 2015-01-05 23:23 cbeigong 阅读(135) 评论(0) 推荐(0)
摘要: 1 : 2 Implement pow(x, n). 3 4 class Solution { 5 public: 6 double pow(double x, int n) { 7 8 //显然我们应该用类似于分治的算法pow(double x, int n) = p... 阅读全文
posted @ 2015-01-05 23:21 cbeigong 阅读(145) 评论(0) 推荐(0)