原创 leetcode之104. Maximum Depth of Binary Tree(C++解法)

*****************************我是分割線************************ /** * Definition for a binary tree node. * struct T

原创 leetcode之283. Move Zeroes

題目: Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of

原创 leetcode之203. Remove Linked List Elements(C++解法)

題目: Remove all elements from a linked list of integers that have value val. Example Given: 1 –> 2 –> 6 –> 3 –> 4

原创 Git初探——ubuntu命令行安裝git並簡單使用

Git初探——ubuntu命令行安裝git並簡單使用 Linux版本14.04 平臺:虛擬機 狀態:用戶態即可,不推薦使用root 1、 git安裝:sudo apt-get install git 2、 在根目錄

原创 leetcode之234. Palindrome Linked List(C++解法)

題目: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1)

原创 leetcode之27. Remove Element(C++解法)

題目: Given an array and a value, remove all instances of that value in place and return the new length. Do not allo

原创 leetcode之392. Is Subsequence(C++解法 動態規劃 貪心 模式匹配)

題目: Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case

原创 leetcode之20. Valid Parentheses

原題: Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string i

原创 基於微信的分佈式系統分析

如今微信已經成爲很多人生活中不可缺少的一部分,無論是在社交、商業推廣還是支付領域,微信都有着傑出的表現。自2011年誕生以來,截止到2015年第一季度,微信已經覆蓋中國90%以上的智能手機,月活躍用戶達到5.49億,用戶覆蓋200

原创 leetcode之371. Sum of Two Integers(C++解法)

題目: Write a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, re

原创 leetcode之237. Delete Node in a Linked List(C++解法)

題目: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. S

原创 leetcode之258. Add Digits(C++解法)

題目: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For examp

原创 leetcode之219. Contains Duplicate II(C++解法)

題目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the ar

原创 leetcode之189. Rotate Array(C++解法)

題目: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5

原创 leetcode之147. Insertion Sort List(C++解法)

題目: Sort a linked list using insertion sort. 鏈表的插入排序 ********************************我是分割線**********************