<?php /** * @param array $arr 递增数字数组 * @param int $number 待查找的数字 * @return int 返回找到的键 */ function binary_search($arr,$number){ // 非数组或数组为空,返回-1 if(!is ...
分类:
其他好文 时间:
2020-08-20 19:22:52
阅读次数:
94
1.安装 gcc-c++ 先查看gcc版本信息 gcc --v 2.安装redis redis 官网的安装命令;官网地址:https://redis.io/download 先执行 wget http://download.redis.io/releases/redis-6.0.6.tar.gz,把 ...
分类:
其他好文 时间:
2020-08-20 18:24:31
阅读次数:
66
Educational Codeforces Round 19 A. k-Factorization 找出所有质因子,把多的合并一下 view code //#pragma GCC optimize("O3") //#pragma comment(linker, "/STACK:1024000000 ...
分类:
其他好文 时间:
2020-08-19 19:49:08
阅读次数:
61
Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all ...
分类:
其他好文 时间:
2020-08-19 19:48:05
阅读次数:
63
Given the root of a binary search tree with distinct values, modify it so that every node has a new value equal to the sum of the values of the origin ...
分类:
其他好文 时间:
2020-08-19 19:47:45
阅读次数:
64
Given a binary tree, return the inorder traversal of its nodes' values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] Follow up: Recursive so ...
分类:
其他好文 时间:
2020-08-17 17:50:25
阅读次数:
81
1.[root@centos8 ~]#wget https://github.com/abishekvashok/cmatrix/releases/download/v2.0/cmatrix-v2.0-Butterscotch.tar 2. [root@centos8 ~]#dnf -y insta ...
分类:
其他好文 时间:
2020-08-17 17:01:41
阅读次数:
55
20200727 1|0Linux目录结构 基本介绍 Linux的文件系统是采用层级式的树状结构,在此结构中的最上层是/根目录 tip1:在Linux世界里,一切皆是文件 示例 /bin:bin是Binary的缩写, 这个目录存放着最经常使用的命令。 /boot:这里存放的是启动Linux时使用的一 ...
分类:
系统相关 时间:
2020-08-17 16:44:57
阅读次数:
77
问题: 二分查找,给定一个已排序的数组,和一个目标值target 在该数组中找到target的index返回,若没找到,则返回-1。 Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exist ...
分类:
其他好文 时间:
2020-08-12 15:53:00
阅读次数:
60