摘要: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical a 阅读全文
posted @ 2016-03-03 09:58 EvansYang 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, giv 阅读全文
posted @ 2016-03-03 01:01 EvansYang 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 /** * Definition for a binary tree node. * struct TreeNode { * int val; * 阅读全文
posted @ 2016-03-02 21:03 EvansYang 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2016-03-02 20:36 EvansYang 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. Supposed the linked list is 1 -> 2 -> 3 - 阅读全文
posted @ 2016-03-02 19:50 EvansYang 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a 阅读全文
posted @ 2016-03-02 15:06 EvansYang 阅读(98) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-03-02 15:02 EvansYang 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2016-03-02 15:00 EvansYang 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 本文默认mysql安装目录为/usr/local/mysql在项目的header search paths中添加/usr/local/mysql/includ 2.在项目的library search paths中添加/usr/local/mysql/li 3.在项目的 Ot... 阅读全文
posted @ 2015-05-07 14:54 EvansYang 阅读(817) 评论(0) 推荐(0) 编辑