WenJieWangFlyToWorld

导航

上一页 1 ··· 8 9 10 11 12 13 下一页

2017年6月1日 #

BaseAdapter

摘要: 作者通过Java代码来实现布局,而我习惯通过.xml文件来实现,所以我对程序做了如下修改 MainActivity.java public class MainActivity extends Activity { ListView myList; TextView textView; Layout 阅读全文

posted @ 2017-06-01 16:14 WenjieWangFlyToWorld 阅读(172) 评论(0) 推荐(0) 编辑

2017年5月29日 #

10 数的高度 节点数 叶子节点数 度为2的节点数

摘要: @Override public int TreeDeep(TreeNode treeNode) { if (treeNode == null) { return 0; } int ld = TreeDeep(treeNode.leftchild); int rd = TreeDeep(treeNo 阅读全文

posted @ 2017-05-29 21:52 WenjieWangFlyToWorld 阅读(233) 评论(0) 推荐(0) 编辑

8 根据前序遍历和中序遍历得到二叉树

摘要: /** * 前序遍历和中序遍历创建二叉树 Pre 前序遍历的数组 In 中序遍历的数组 lpre 前序遍历数组开始位置 hpre前序遍历结束位置 * lin前序遍历数组开始位置 hin前序遍历结束位置 */ @Override public TreeNode PreInCreat(int[] Pre 阅读全文

posted @ 2017-05-29 21:24 WenjieWangFlyToWorld 阅读(120) 评论(0) 推荐(0) 编辑

9 根据中序遍历和后序遍历得到二叉树

摘要: public TreeNode InPostCreat(int[] In, int[] Post, int lin, int hin, int lpost, int hpost) { TreeNode root = new TreeNode(0); if (Post.length == 0 || I 阅读全文

posted @ 2017-05-29 21:21 WenjieWangFlyToWorld 阅读(204) 评论(0) 推荐(0) 编辑

2017年5月27日 #

Leed code 11. Container With Most Water

摘要: 1 public int maxArea(int[] height) { 2 int left = 0, right = height.length - 1; 3 int maxArea = 0; 4 5 while (left < right) { 6 maxArea = Math.max(maxArea, Math.min(height[... 阅读全文

posted @ 2017-05-27 13:04 WenjieWangFlyToWorld 阅读(174) 评论(0) 推荐(0) 编辑

2017年5月26日 #

7 二叉树的操作 四种遍历

摘要: 1 package com.wwj.cn; 2 3 public interface TreeInterf { 4 void PreOrderTraverse(TreeNode treeNode);// 前序遍历 递归 5 6 void InOrderTraverse(TreeNode treeNo 阅读全文

posted @ 2017-05-26 17:16 WenjieWangFlyToWorld 阅读(111) 评论(0) 推荐(0) 编辑

6 队列的操作

摘要: 1 package com.wwj.cn; 2 3 public interface QueueInter { 4 5 void InitQueue(Queue queue);// 初始化队列 6 7 boolean EnQueue(Queue queue, SElemType e);// 队尾添加 阅读全文

posted @ 2017-05-26 08:13 WenjieWangFlyToWorld 阅读(83) 评论(0) 推荐(0) 编辑

5 队列的数据结构

摘要: 1 package com.wwj.cn; 2 3 public class Queue { 4 private final int MAXSIZE = 10; 5 int[] data = new int[MAXSIZE]; 6 int front; 7 int rear; 8 } 阅读全文

posted @ 2017-05-26 08:12 WenjieWangFlyToWorld 阅读(147) 评论(0) 推荐(0) 编辑

2017年5月25日 #

4 栈的操作

摘要: 1 package com.wwj.cn; 2 3 public interface SqStackInter { 4 boolean Push(SqStack sqStack, SElemType e);// 进栈操作 5 6 boolean Pop(SqStack sqStack, SElemT 阅读全文

posted @ 2017-05-25 22:27 WenjieWangFlyToWorld 阅读(109) 评论(0) 推荐(0) 编辑

3 栈的数据结构

摘要: package com.wwj.cn; public class SqStack { private final int MAXSIZE = 10; int[] data = new int[MAXSIZE]; int top;// 栈顶指针 } 阅读全文

posted @ 2017-05-25 22:24 WenjieWangFlyToWorld 阅读(121) 评论(0) 推荐(0) 编辑

上一页 1 ··· 8 9 10 11 12 13 下一页