2014年11月7日

Same Tree

摘要: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide... 阅读全文

posted @ 2014-11-07 23:44 luckygxf 阅读(136) 评论(0) 推荐(0) 编辑

归并排序

摘要: 归并排序1.将两个有序序列归并成一个有序序列2.将带排序数组,通过递归调整成左右两个有序序列,在调用归并算法,将其归并成一个有序序列,完成排序Merg.java 1 package com.gxf.merg; 2 3 /** 4 * 归并排序 5 * 初始状态,将数组看成n个单独有序的序列,两... 阅读全文

posted @ 2014-11-07 23:38 luckygxf 阅读(172) 评论(0) 推荐(0) 编辑

Maximum Depth of Binary Tree

摘要: Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ... 阅读全文

posted @ 2014-11-07 00:09 luckygxf 阅读(117) 评论(0) 推荐(0) 编辑

导航