用栈实现队列 - 力扣(LeetCode)https://leetcode-cn.com/problems/implement-queue-using-stacks/ https://leetcode.com/problems/implement-queue-using-stacks/solutio ...
分类:
其他好文 时间:
2019-05-04 00:09:20
阅读次数:
141
案例一:Leetcode 28.实现 strStr() 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 -1。 示例 1: 输入: haystack = "hello", ne ...
分类:
其他好文 时间:
2019-05-03 14:44:59
阅读次数:
114
小结: 1、 借助linkedlist,每次添加元素后,反转,取逆序 Implement Stack using Queues - LeetCodehttps://leetcode.com/problems/implement-stack-using-queues/solution/ Impleme ...
分类:
其他好文 时间:
2019-05-02 21:22:57
阅读次数:
136
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib ...
分类:
编程语言 时间:
2019-04-30 21:48:31
阅读次数:
131
Asking you to implement the Math.pow method The navie implemenation can be: It takes O(N) time. Now if we want to improve it to O(logN) time. we can d ...
分类:
其他好文 时间:
2019-04-29 22:32:47
阅读次数:
146
题目描述: 实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始)。如果不存在,则返回 1。 ++示例 1:++ 输入: haystack = "hello", needl ...
分类:
其他好文 时间:
2019-04-29 20:52:16
阅读次数:
143
Two Pointers 1. 28. Implement strStr() 用 i 记录haystack偏移量,j 记录 needle 的偏移量。 2. 125. Valid Palindrome 只需要建立两个指针,head 和 tail, 分别从字符的开头和结尾处开始遍历整个字符串,如果遇到非 ...
分类:
其他好文 时间:
2019-04-26 22:39:50
阅读次数:
189
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. ...
分类:
其他好文 时间:
2019-04-26 11:01:40
阅读次数:
107
Map集合: java.util,Map<k,v> 特点:1、键值对 2、key-value一一对应 3、key不允许重复。 Map常用实现类: java.util.HashMap<k,v> 集合 implement Man<k,v> 接口。 HashMap的特点:1、HashMap集合,底层是哈希 ...
分类:
其他好文 时间:
2019-04-24 12:10:04
阅读次数:
127
Mobile Application DevelopmentCOSC2309/2347 Semester 1, 2019Movie Night PlannerAssignment 1 (20 marks)You are to implement a simple Movie Night Planne ...
分类:
其他好文 时间:
2019-04-21 20:27:22
阅读次数:
153