码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
199二叉树的右视图
题目: 给定一棵二叉树,想象自己站在它的右侧,按照从顶部到底部的顺序,返回从右侧所能看到的节点值。 来源: https://leetcode-cn.com/problems/binary-tree-right-side-view/ 法一: 自己的代码 构建一个队列,每次都从右边取值,用双层循环实现层 ...
分类:其他好文   时间:2019-12-09 18:41:37    阅读次数:85
C# read file to bytes,File.ReadAllFiles,File.Open(),BinaryReader
using System; using System.Text; using System.IO; namespace ConsoleApplication15 { class Program { static void Main(string[] args) { string fileName =... ...
分类:Windows程序   时间:2019-12-09 13:35:07    阅读次数:125
LeetCode 1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix (最少翻转次数将二进制矩阵全部置为0)
给一个矩阵mat,每个格子都是0或1,翻转一个格子会将该格子以及相邻的格子(有共同边)全部翻转(0变为1,1变为0) 求问最少需要翻转几次将所有格子全部置为0。 这题的重点是数据范围,比赛结束看了眼数据范围想把自己锤死= = m == mat.length n == mat[0].length 1 ...
分类:其他好文   时间:2019-12-08 15:55:36    阅读次数:154
[Leetcode] 104. Maximum Depth of Binary Tree
1 int depth = 0; 2 int currentMaxDepth = 0; 3 public int maxDepth(TreeNode root) { 4 if(root == null){ 5 return 0; 6 } 7 8 int leftDepth = 1; 9 int ri... ...
分类:其他好文   时间:2019-12-08 12:15:18    阅读次数:84
MySQL数据库 上
MySQL数据库 (上) MySQL数据类型:数值类型、日期和时间类型、字符串类型 1、数值类型 注:BIT数据类型保存位字段值,并且支持MyISAM、MEMORY、InnoDB和BDB表 类型大小范围(有符号)范围(无符号)用途 TINYINT 1 字节 (-128,127) (0,255) 小整 ...
分类:数据库   时间:2019-12-08 10:47:58    阅读次数:109
第五周训练 | 二叉树+线段树
A - Binary Tree Traversals 记一个模板 #include<iostream> using namespace std; typedef struct Tree{ Tree *left; Tree *right; int value; }Tree; Tree *root; T ...
分类:其他好文   时间:2019-12-08 10:40:35    阅读次数:64
[LC] 236. Lowest Common Ancestor of a Binary Tree
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 lowes ...
分类:其他好文   时间:2019-12-08 01:34:55    阅读次数:120
[LC] 235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia ...
分类:其他好文   时间:2019-12-08 00:58:19    阅读次数:99
etc目录下的重要文件介绍
一.liunx系统目录根(/)目录下的结构信息boot目录存放引导系统启动文件信息etc目录存放系统服务配置文件信息opt/usr目录存放用户安装的第三方软件程序信息root系统超级管理用户的家目录home普通用户的家目录var目录存放系统日志文件tmp目录临时存放数据的目录sbin目录存放二进制超级管理员命令文件目录(superBinary)bin目录存放二进制普通用户命令文件目录(Binary
分类:其他好文   时间:2019-12-07 23:23:45    阅读次数:375
websocket通信1009错误,
问题说明: springboot继承 WebSocketConfigurer实现websocket通信服务,服务器端报错,“The decoded text message was too big for the output buffer and the endpoint does not sup ...
分类:Web程序   时间:2019-12-07 21:42:18    阅读次数:420
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!