The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. A binary search tree (BST) i ...
分类:
其他好文 时间:
2020-04-14 18:37:40
阅读次数:
59
Q:给定一个二叉树, 找到该树中两个指定节点的最近公共祖先。 最近公共祖先的定义为:“对于有根树 T 的两个结点 p、q,最近公共祖先表示为一个结点 x,满足 x 是 p、q 的祖先且 x 的深度尽可能大(一个节点也可以是它自己的祖先)。” 例如,给定如下二叉树: root =?[3,5,1,6,2 ...
分类:
其他好文 时间:
2020-04-14 15:16:03
阅读次数:
53
反射:是利用字符串的形式去对象 (模块) 中操作 (寻找/检查/删除/设置) 成员,以後看其他源碼的時候會經常看到反射,最有代表性的就是 Tornado 和 Django 框架 案例例子 假设创建了一个common.py,程序里有3个功能,比如网站里的登录页面、主页页面和登出页面都是不同的页面,要显 ...
分类:
编程语言 时间:
2020-04-14 00:57:17
阅读次数:
95
3.1中提到我定义了一些公共配置项,现在我来说一说配置项的用法: 1. 提供软件标识符 1 public static class CfgIndentifiers 2 { 3 public static readonly string Identifier = 4 #if DEBUG 5 "DEBU ...
By是selenium中内置的一个class,在这个class中有各种方法来定位元素 By所支持的定位器的分类: CLASS_NAME = 'class name' CSS_SELECTOR = 'css selector' ID = 'id' LINK_TEXT = 'link text' NAM ...
分类:
编程语言 时间:
2020-04-13 10:36:08
阅读次数:
150
复制一下我们的groupId 建新的模块 删除一些没用的东西 删除test文件夹,这里不需要做test的东西 resources也删除 Application也删除 common的复制到utils里面 这里删掉,父工程里面有,二是utils模块本身是不需要的 build删除 父节点引入utils 复 ...
分类:
其他好文 时间:
2020-04-12 18:49:28
阅读次数:
73
使用.NET Framework的应用程序和使用.NET Core的应用程序都需要CLR(Common Language Runtime,公共语言运行库)。 然而,.NET Core使用CoreCLR,而.NET Framework使用CLR。 在CLR执行应用程序之前,编写好的源代码都需要编译。 ...
分类:
编程语言 时间:
2020-04-12 18:33:22
阅读次数:
95
题目描述 编写一个函数来查找字符串数组中的最长公共前缀。 如果不存在公共前缀,返回空字符串 ""。 示例 题目链接: https://leetcode cn.com/problems/longest common prefix/ 思路1 首先找到最短的字符串,然后遍历最短的字符串,将当前位和其余字符 ...
分类:
其他好文 时间:
2020-04-12 18:15:14
阅读次数:
58
ylbtech-Code-Validator:验证IPv6地址 1.返回顶部 1、 using System; using System.Text.RegularExpressions; namespace Sp.Common { public class ValidatorHelper { /// ...
分类:
其他好文 时间:
2020-04-12 16:55:21
阅读次数:
69
ylbtech-Code-Validator:验证电话号码(可以是固定电话号码或手机号码) 1.返回顶部 1、 using System; using System.Text.RegularExpressions; namespace Sp.Common { public class Validat ...
分类:
移动开发 时间:
2020-04-12 16:50:44
阅读次数:
74