- 博客(6)
- 收藏
- 关注
原创 Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the following
2014-11-25 16:45:38 279
原创 Same Tree
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 and the nodes have the same value.
2014-11-18 13:36:56 275
原创 数组建立二叉树
根据字符数组来建立二叉树,并简单实现了三种遍历#include #include "stdlib.h"//二叉树结构typedef struct BiTNode { char data; struct BiTNode *lchild,*rchild; //左右孩子指针} BiTNode, *BiTree;//前序法创建二叉树void CreatBiTree(BiTre
2014-11-11 13:34:27 949
原创 Maximum Depth of Binary Tree
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 leaf node.
2014-11-11 12:43:36 275 1
原创 Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi
2014-11-08 17:48:55 250
原创 Reverse Integer
Reverse digits of an integer. //反转数字的值Example1: x = 123, return 321Example2: x = -123, return -321Here are some good questions to ask before coding. Bonus points for you if yo
2014-11-03 00:29:51 209
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人