上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页
摘要: 地址:https://leetcode-cn.com/problems/power-of-two/ <?php /** 给定一个整数,编写一个函数来判断它是否是 2 的幂次方。 示例 1: 输入: 1 输出: true 解释: 20 = 1 示例 2: 输入: 16 输出: true 解释: 24 阅读全文
posted @ 2020-04-13 09:56 花花妹子。 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/implement-queue-using-stacks/ <?php /** 232. 用栈实现队列 使用栈实现队列的下列操作: push(x) -- 将一个元素放入队列的尾部。 pop() -- 从队列首部移除元素。 pee 阅读全文
posted @ 2020-04-11 16:49 花花妹子。 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/single-number/ <?php /** 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现两次。找出那个只出现了一次的元素。 说明: 你的算法应该具有线性时间复杂度。 你可以不使用额外空间来实现吗? 阅读全文
posted @ 2020-04-11 16:17 花花妹子。 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/min-stack/ <?php /** 设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 push(x) —— 将元素 x 推入栈中。 pop() —— 删除栈顶的元素。 top() —— 阅读全文
posted @ 2020-04-11 16:15 花花妹子。 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/merge-sorted-array/ <?php /** 给你两个有序整数数组 nums1 和 nums2,请你将 nums2 合并到 nums1 中,使 nums1 成为一个有序数组。 说明: 初始化 nums1 和 num 阅读全文
posted @ 2020-04-10 18:00 花花妹子。 阅读(128) 评论(0) 推荐(0) 编辑
摘要: d地址:https://leetcode-cn.com/problems/implement-strstr/ <?php /** 实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 阅读全文
posted @ 2020-04-09 17:49 花花妹子。 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/longest-common-prefix/ <?php /** * 编写一个函数来查找字符串数组中的最长公共前缀。 * * 如果不存在公共前缀,返回空字符串 ""。 * * 示例 1: * * 输入: ["flower","f 阅读全文
posted @ 2020-04-07 21:37 花花妹子。 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/add-two-numbers/ <?php /** 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回 阅读全文
posted @ 2020-04-07 20:09 花花妹子。 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/3sum/ <?php /** 给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有满足条件且不重复的三元组。 注意:答案中不可以包含重复的 阅读全文
posted @ 2020-04-06 22:25 花花妹子。 阅读(138) 评论(0) 推荐(0) 编辑
摘要: php基本概念:服务端脚本语言,底层是由c实现的 php语言的整体架构: Application:php程序 SAPI:服务端应用编程接口(让php和外围交换数据[PHP通过mod_php5.so模块和Apache相连]) Extensions扩展(扩展库) Zend引擎(将php翻译成一种叫opc 阅读全文
posted @ 2020-04-02 16:18 花花妹子。 阅读(164) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 33 下一页