一、 1.我们设置主活动的框架,把主活动的屏幕分成两个碎片,各显示子活动的界面?。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android ...
分类:
移动开发 时间:
2020-04-24 01:19:10
阅读次数:
82
使用中序遍历,返回第k个数来处理 # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None ...
分类:
其他好文 时间:
2020-04-24 01:02:36
阅读次数:
63
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: ...
分类:
其他好文 时间:
2020-04-24 00:50:47
阅读次数:
60
解题思路:入栈顺序即为前序,出栈顺序为中序,等价于求由前序和中序确定后序 #include <stdio.h> #include <string.h> #include <malloc.h> typedef char Element[5]; typedef struct TNode { int da ...
分类:
其他好文 时间:
2020-04-23 21:11:36
阅读次数:
103
Spark SQL原理解析前言: "Spark SQL源码剖析(一)SQL解析框架Catalyst流程概述" 这一次要开始真正介绍Spark解析SQL的流程,首先是从Sql Parse阶段开始,简单点说,这个阶段就是使用Antlr4,将一条Sql语句解析成语法树。 可能有童鞋没接触过antlr4这个 ...
分类:
数据库 时间:
2020-04-23 20:59:04
阅读次数:
93
二叉查找树(Binary Search Tree),也称为二叉搜索树、有序二叉树或排序二叉树,是指一棵空树或者具有下列性质的二叉树: 若任意节点的左子树不空,则左子树上所有节点的值均小于它的根节点的值; 若任意节点的右子树不空,则右子树上所有节点的值均大于它的根节点的值; 任意节点的左、右子树也分别 ...
分类:
编程语言 时间:
2020-04-23 18:45:21
阅读次数:
59
1、二叉树:任意一个结点的子结点个数最多两个,且子结点的位置不可更改,二叉树的子树有左右之分。 1)分类:(1)一般二叉树(2)满二叉树:在不增加树的层数的前提下,无法再多添加一个结点的二叉树就是满二叉树。(3)完全二叉树:如果只是删除了满二叉树最底层最右边的连续的若干个结点,这样形成的二叉树就是完 ...
分类:
编程语言 时间:
2020-04-23 17:34:51
阅读次数:
113
序列化和反序列化代码如下 /// <summary> /// 将一个object对象序列化,返回一个byte[] /// </summary> public static byte[] ObjectToBytes(object obj) { using (MemoryStream ms = new ...
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: ...
分类:
其他好文 时间:
2020-04-23 12:09:43
阅读次数:
60
题目描述 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The ...
分类:
其他好文 时间:
2020-04-23 00:51:39
阅读次数:
73