摘要:
Source Given 3*n + 1 numbers, every numbers occurs triple times except one, find it. Example Given [1,1,2,3,3,3,2,2,4,1] return 4 Challenge One-pass, 阅读全文
摘要:
Problem 「找单数」系列题,技巧性较强,需要灵活运用位运算的特性。 Given 2*n + 1 numbers, every numbers occurs twice except one, find it. Example Given [1,2,2,1,3,4,3], return 4 Ch 阅读全文
摘要:
Problem Given n pieces of wood with length L[i] (integer array). Cut them into smallpieces to guarantee you could have equal or more than k pieces wit 阅读全文
摘要:
实现 int sqrt(int x) 函数 计算并返回 x 的平方根,其中 x 是非负整数。 由于返回类型是整数,结果只保留整数的部分,小数部分将被舍去。 示例 1: 输入: 4 输出: 2 示例 2: 输入: 8 输出: 2 说明: 8 的平方根是 2.82842..., 由于返回类型是整数,小数 阅读全文
摘要:
Problem There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. Example Given A=[1,2,3,4,5,6] and 阅读全文
摘要:
Linux物理机旧的磁盘已经满了,加了一块新的机械硬盘,下面说说如何格式化这块硬盘 1、运行 “fdisk -l”,查看磁盘情况,根据磁盘标识符或者磁盘大小确定新加的磁盘是哪个,笔者这里新加的磁盘是 /dev/sda [root@bogon /]# fdisk -l 磁盘 /dev/sdb:1000 阅读全文
摘要:
打开vmware,菜单栏->编辑->虚拟网络编辑器 修改桥接模式,一般改成最后一个 修改后点击应用,虚拟机就能正常上网了 阅读全文
摘要:
重启了centos后,发现k8s没有正常启动 # kubectl get nodes 提示无法正常连接,查看k8s是否正常启动 # systemctl status kubelet 提示:Active: activating (auto-restart) (Result: exit-code) 查看 阅读全文
摘要:
前言 了解IEEE-754之前,先了解下什么是十进制和二进制,以及它们之间如何转化 十进制 十进制按照字面意思来理解,就是逢十进一,比如我们现在用的货币也好,计算也好,都是十进制,用0-9十个数字来表示 二进制 十进制十逢十进一,二进制就是二进一,用0和1来表示所有的数字 二进制转十进制 二进制转十 阅读全文
摘要:
解决PHP编译错误: configure: error: Package requirements (oniguruma) were not met: No package 'oniguruma' found 网上流传的解决方案: [hi@hi ~]# yum install oniguruma o 阅读全文