摘要: 地址:https://leetcode-cn.com/problems/sort-an-array/ <?php /** 给你一个整数数组 nums,请你将该数组升序排列。 示例 1: 输入:nums = [5,2,3,1] 输出:[1,2,3,5] 示例 2: 输入:nums = [5,1,1,2 阅读全文
posted @ 2020-03-31 21:03 花花妹子。 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/string-to-integer-atoi/ <?php /** 请你来实现一个 atoi 函数,使其能将字符串转换成整数。 首先,该函数会根据需要丢弃无用的开头空格字符,直到寻找到第一个非空格的字符为止。 当我们寻找到的第一 阅读全文
posted @ 2020-03-31 20:27 花花妹子。 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 结论:count(字段)<count(id)<count(1)≈count(*) count(*)的实现方式 MyISAM把一个表的总行数储存在磁盘里,count(*)直接返回 InnoDB一行一行读,累计计数 统计表行数(不准确) show table status count(*)、count( 阅读全文
posted @ 2020-03-31 15:25 花花妹子。 阅读(586) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/compress-string-lcci/ <?php /** 字符串压缩。利用字符重复出现的次数,编写一种方法,实现基本的字符串压缩功能。比如,字符串aabcccccaaa会变为a2b1c5a3。若“压缩”后的字符串没有变短, 阅读全文
posted @ 2020-03-31 09:45 花花妹子。 阅读(126) 评论(0) 推荐(0) 编辑