上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页
摘要: 地址:https://leetcode-cn.com/problems/build-an-array-with-stack-operations/ <?php class Solution { /** 给你一个目标数组 target 和一个整数 n。每次迭代,需要从 list = {1,2,3... 阅读全文
posted @ 2020-06-19 17:29 花花妹子。 阅读(126) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/min-stack-lcci/ <?php /** * * 请设计一个栈,除了常规栈支持的pop与push函数以外,还支持min函数,该函数返回栈元素中的最小值。执行push、pop和min操作的时间复杂度必须为O(1)。 * 阅读全文
posted @ 2020-06-19 16:45 花花妹子。 阅读(120) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/implement-queue-using-stacks-lcci/ <?php /** * Created by PhpStorm. * User: huahua * Date: 2020/6/19 * Time: 下午4:2 阅读全文
posted @ 2020-06-19 16:29 花花妹子。 阅读(128) 评论(0) 推荐(0)
摘要: 1.请求源码 curl http://wttr.in/ 天气网站 2.文件下载 -o :保存文件 -s:禁用进度表 --progress-bar:让进度显示为进度条 -C - :断点连续下载 --limit-rate 100k:限速 3.获取response头信息 -i:显示头信息 4.请求方式 - 阅读全文
posted @ 2020-06-04 18:21 花花妹子。 阅读(162) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/number-of-1-bits/ <?php /** 编写一个函数,输入是一个无符号整数,返回其二进制表达式中数字位数为 ‘1’ 的个数(也被称为汉明重量)。 示例 1: 输入:000000000000000000000000 阅读全文
posted @ 2020-06-04 17:08 花花妹子。 阅读(123) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/reverse-bits/ <?php /** 颠倒给定的 32 位无符号整数的二进制位。 示例 1: 输入: 00000010100101000001111010011100 输出: 001110010111100000101 阅读全文
posted @ 2020-06-04 16:32 花花妹子。 阅读(168) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/median-of-two-sorted-arrays/ <?php /** 给定两个大小为 m 和 n 的正序(从小到大)数组 nums1 和 nums2。 请你找出这两个正序数组的中位数,并且要求算法的时间复杂度为 O(lo 阅读全文
posted @ 2020-06-04 15:32 花花妹子。 阅读(265) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/longest-palindromic-substring/ <?php /** 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 示例 1: 输入: "babad" 输出: "bab" 阅读全文
posted @ 2020-06-04 10:26 花花妹子。 阅读(128) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/valid-anagram/ <?php /** * 给定两个字符串 s 和 t ,编写一个函数来判断 t 是否是 s 的字母异位词。 * * 示例 1: * * 输入: s = "anagram", t = "nagaram" 阅读全文
posted @ 2020-06-03 20:58 花花妹子。 阅读(121) 评论(0) 推荐(0)
摘要: 地址:https://leetcode-cn.com/problems/implement-stack-using-queues/ <?php /** 使用队列实现栈的下列操作: push(x) -- 元素 x 入栈 pop() -- 移除栈顶元素 top() -- 获取栈顶元素 empty() - 阅读全文
posted @ 2020-06-03 16:27 花花妹子。 阅读(119) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 34 下一页