码迷,mamicode.com
首页 >  
搜索关键字:two pointers    ( 12138个结果
Two Pointer
Two Pointer 141. Linked List Cycle 判断链表是否有环 Can you solve it using O(1) (i.e. constant) memory? "leetcode 141. Linked List Cycle" 142. Linked List Cyc ...
分类:其他好文   时间:2020-05-05 18:11:17    阅读次数:54
PAT 甲级 1050.String Subtraction C++/Java
"题目来源" Given two strings S 1 and S 2, S = S 1? S 2 is defined to be the remaining string after taking all the characters in S 2 from S 1. Your task is ...
分类:编程语言   时间:2020-05-05 01:06:54    阅读次数:91
A Simple Problem with Integers POJ - 3468 (区间修改+区间查询)
A Simple Problem with Integers POJ - 3468 You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation ...
分类:其他好文   时间:2020-05-05 00:23:29    阅读次数:80
【数组】747. 至少是其他数字两倍的最大数
题目: 解答: 设置 one、two 表示最大值和第二大值的数字; 设置 oneIndex 表示最大值的索引; 通过 for 遍历 nums; 遍历 nums 过程中:如果这个数 nums[i] 比最大值还大,那么替换掉 two、one、oneIndex;如果这个数 nums[i] 比第二大值还大, ...
分类:编程语言   时间:2020-05-04 19:17:28    阅读次数:75
原生JS实现简单的汇率转换问题
html代码 css代码 JavaScript代码 javascript // 获取货币1对象 let currencyEl_one = document.getElementById("currency one"); // 获取货币2对象 let currencyEl_two = document ...
分类:Web程序   时间:2020-05-04 00:43:15    阅读次数:70
矿大OJ 1768.Power Strings.
题目描述 Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of co ...
分类:其他好文   时间:2020-05-03 18:40:49    阅读次数:162
Reverse order pairs
In a sequence of numbers,we can find some number pairs that conform to the rule below: Assuming that there exist two numbers,N and M and it's position ...
分类:其他好文   时间:2020-05-02 18:46:09    阅读次数:60
1143 Lowest Common Ancestor (30分)
The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. A binary search tree (BST) i ...
分类:其他好文   时间:2020-05-02 14:54:12    阅读次数:50
1148 Werewolf - Simple Version (20分)
Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game, player #1 ...
分类:其他好文   时间:2020-05-02 14:51:55    阅读次数:49
1807. 斐波纳契数列简单
1807. 斐波纳契数列简单 中文English Find the Nth number in Fibonacci sequence. A Fibonacci sequence is defined as follow: The first two numbers are 0 and 1. The  ...
分类:其他好文   时间:2020-05-02 11:35:04    阅读次数:61
12138条   上一页 1 ... 25 26 27 28 29 ... 1214 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!