24. Swap Nodes in Pairs https://leetcode.com/problems/linked-list-cycle/ Given a linked list, swap every two adjacent nodes and return its head. You m ...
分类:
其他好文 时间:
2020-06-29 22:41:37
阅读次数:
55
In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi ...
分类:
其他好文 时间:
2020-06-27 09:35:14
阅读次数:
75
一. Vue 核心小知识点 1、vue 中 key 值的作用? key 的特殊属性主要用在 Vue 的虚拟 DOM 算法,在新旧 nodes 对比时辨识 VNodes。如果不使用 key,Vue 会使用一种最大限度减少动态元素并且尽可能的尝试修复/再利用相同类型元素的算法。使用 key,它会基于 k ...
分类:
其他好文 时间:
2020-06-25 23:15:24
阅读次数:
80
1 安装生成证书工具 1.0环境配置 Nodes 主机ip 角色 Etcd1 192.168.253.*** Master Etcd2 192.168.253.*** Node Etcd3 192.168.253.*** Node 1.1 安装三个工具分别是cfssl、cdssl-json、cfss ...
分类:
其他好文 时间:
2020-06-21 20:22:12
阅读次数:
77
想了解 ES 集群的底层原理,不再只关注业务层面了。 前置前提: 1、只有候选主节点(master:true)的节点才能成为主节点。 2、最小主节点数(min_master_nodes)的目的是防止脑裂。 这个我看了各种网上分析的版本和源码分析的书籍,云里雾里。 核对了一下代码,核心入口为 find ...
分类:
其他好文 时间:
2020-06-21 09:54:22
阅读次数:
96
Merge Two Sorted Lists (E) 题目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of ...
分类:
其他好文 时间:
2020-06-21 09:38:24
阅读次数:
51
地址:https://leetcode-cn.com/problems/minimum-distance-between-bst-nodes/ <?php /** 给定一个二叉搜索树的根节点 root,返回树中任意两节点的差的最小值。 示例: 输入: root = [4,2,6,1,3,null,n ...
分类:
其他好文 时间:
2020-06-19 18:00:43
阅读次数:
51
Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it exist ...
分类:
其他好文 时间:
2020-06-08 00:15:28
阅读次数:
76
题目如下: Given a binary tree root, a node X in the tree is named good if in the path from root to X there are no nodes with a value greater than X. Retur ...
分类:
其他好文 时间:
2020-06-04 10:33:57
阅读次数:
77
Ashish has a tree consisting of nn nodes numbered 11 to nn rooted at node 11 . The ii -th node in the tree has a cost aiai , and binary digit bibi is ...
分类:
其他好文 时间:
2020-06-01 23:55:59
阅读次数:
100