链接:https://leetcode-cn.com/problems/convert-sorted-list-to-binary-search-tree/ 代码 /** * Definition for singly-linked list. * struct ListNode { * int v ...
分类:
其他好文 时间:
2020-07-26 00:07:52
阅读次数:
59
链接:https://leetcode-cn.com/problems/balanced-binary-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; ...
分类:
其他好文 时间:
2020-07-26 00:05:02
阅读次数:
58
1.安装编译工具及库文件 # yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel pcre-devel gcc、gcc-c++ # 主要用来进行编译相关使用 openssl、openssl-devel # ...
分类:
其他好文 时间:
2020-07-25 23:57:46
阅读次数:
292
这个层序遍历要求返回每层的节点,正常的BFS从队列中弹出一个节点后就判断其有没有左子树和右子树,所以直接用BFS实现的话无法分层输出。 需要记录每层的节点数目,增加一个for循环就可以了。 /** * Definition for a binary tree node. * public class ...
分类:
编程语言 时间:
2020-07-25 23:51:28
阅读次数:
72
Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justif ...
分类:
其他好文 时间:
2020-07-25 09:35:28
阅读次数:
71
主要参考:wpa_supplicant交叉编译 选择的版本: openssl-1.0.2r.tar.gz libnl-3.5.0.tar.gz wpa_supplicant-2.5(版本太新会有报错) 1 libssl编译 1.1下载 下载链接:https://www.openssl.org/sou ...
分类:
其他好文 时间:
2020-07-24 21:25:35
阅读次数:
67
简介:redis作为目前非常主流的key-value型内存数据库,得到了业界广泛的认可与使用。我们可以使用redis作为系统中的缓存数据库,减轻系统压力,也可以使用redis来实现分布式锁。 优点: 对数据高并发读写 对海量数据的高效率存储和访问 对数据的可扩展性和高可用行 缺点: redis(AC ...
导入模块后,可以使用模块提供的通用变量获取与系统有关的信息 >>> import os >>> len(dir(os)) 152 >>> for i in dir(os):print(i) DirEntry F_OK MutableMapping O_APPEND O_BINARY O_CREAT ... ...
分类:
编程语言 时间:
2020-07-24 09:47:07
阅读次数:
86
解题:前序遍历加上筛选 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = ...
分类:
其他好文 时间:
2020-07-23 23:27:44
阅读次数:
132
一、计算机的存储单位有哪些 计算机存储单位一般用bit,Byte,KB,MB,GB,TB,PB,EB,ZB,BB来表示,我们经常将Byte简称为B,将KB简称为K。 二、存储单位之间的换算关系 1、计算机存储信息的最小单位:位 bit (比特) (Binary Digits):存放一位二进制数,即 ...
分类:
其他好文 时间:
2020-07-23 22:23:51
阅读次数:
224