原创 leetcode:235 Lowest Common Ancestor of a Binary Search Tree-每日編程第十二題

Lowest Common Ancestor of a Binary Search Tree Total Accepted: 41013 Total Submissions: 108082 Difficulty: Easy

原创 leetcode:27 Remove Element-每日編程第二十一題

Remove Element Total Accepted: 89646 Total Submissions: 276815 Difficulty: Easy Given an array and a value, remove

原创 leetcode:206 Reverse Linked List-每日編程第十四題

Reverse Linked List Total Accepted: 65133 Total Submissions: 179691 Difficulty: Easy Reverse a singly linked lis

原创 leetcode:191 Number of 1 Bits-每日編程第十三題

Number of 1 Bits Total Accepted: 63943 Total Submissions: 169155 Difficulty: Easy Write a function that takes an

原创 C++11 學習筆記 列表初始化

一.列表初始化 1.在C++98/03中,只有普通數組和POD類型(plain old data類型,可以直接使用memcpy複製的對象)可以用初始化列表來進行初始化。 int i_arr[3] = { 1, 2, 3 }; long

原创 leetcode:169 Majority Element-每日編程第十一題

Majority Element Total Accepted: 78809 Total Submissions: 206122 Difficulty: Easy Given an array of size n, find

原创 leetcode:172 Factorial Trailing Zeroes-每日編程第二十四題

Factorial Trailing Zeroes Total Accepted: 44351 Total Submissions: 144160 Difficulty: Easy Given an integer n, retu

原创 leetcode:198 House Robber-每日編程第二十二題

House Robber Total Accepted: 44999 Total Submissions: 140629 Difficulty: Easy You are a professional robber planning

原创 leetcode:101 Symmetric Tree-每日編程第二十題

Symmetric Tree Total Accepted: 83908 Total Submissions: 257485 Difficulty: Easy Given a binary tree, check whether

原创 leetcode:171 Excel Sheet Column Number-每日編程第十題

Excel Sheet Column Number Total Accepted: 54683 Total Submissions: 140674 Difficulty: Easy   Given a column tit

原创 leetcode:232 Implement Queue using Stacks-每日編程第十六題

Implement Queue using Stacks Total Accepted: 26279 Total Submissions: 77749 Difficulty: Easy Implement the followin

原创 leetcode:110 Balanced Binary Tree-每日編程第十九題

Balanced Binary Tree Total Accepted: 85721 Total Submissions: 261445 Difficulty: Easy Given a binary tree, determin

原创 leetcode:21 Merge Two Sorted Lists-每日編程第十七題

Merge Two Sorted Lists Total Accepted: 95133 Total Submissions: 281996 Difficulty: Easy Merge two sorted linked lists

原创 C++11 學習筆記 右值引用

一.右值引用 C++11增加了一個新的類型,稱爲右值引用(R-value reference),標記爲T &&。右值是指表達式結束後就不再存在的臨時對象。相對應的左值就是指表達式結束後依然存在的持久對象,所有的具名變量或對象都是左值,而右

原创 leetcode:70 Climbing Stairs-每日編程第十五題

Climbing Stairs Total Accepted: 83180 Total Submissions: 234611 Difficulty: Easy You are climbing a stair case. I