码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
Two Sum
1.hashMap方法O(n)空间换时间public class Solution { public int[] twoSum(int[] numbers, int target) { HashMap hash=new HashMap(); int ans[]=ne...
分类:其他好文   时间:2014-07-23 22:20:57    阅读次数:262
RH network
#Red hat enterprise linux variants ##Two install sets available ##两种安装方案 ###Server rhel server rhea advanced platform ###Desktop rhel desktop workstation option Multi-OS option ##RH network #...
分类:Web程序   时间:2014-07-23 21:33:26    阅读次数:283
[leetcode]Add Two Numbers
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:其他好文   时间:2014-07-23 16:51:51    阅读次数:251
【leetcode刷题笔记】Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2014-07-23 15:06:06    阅读次数:320
LeetCode "Copy List with Random Pointer"
Two passes: all pointer linking info will be recorded in 1st pass - to hashmap; 2nd pass recover the pointer relationship from hashmap.1A!class Soluti...
分类:其他好文   时间:2014-07-23 14:59:26    阅读次数:209
LeetCode "Remove Nth Node From End of List"
Another Double pointer solution. 1A!class Solution {public: ListNode *removeNthFromEnd(ListNode *head, int n) { ListNode *p = NULL; ...
分类:其他好文   时间:2014-07-23 14:52:16    阅读次数:176
UVA 5788 Wally World
地址:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3799 Two star-crossed lovers want to meet. The two lovers are standing at distinct points in t...
分类:其他好文   时间:2014-07-23 13:29:04    阅读次数:242
HDU1711 最基础的kmp算法
Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 2 #include 3 using namespace std; 4 .....
分类:其他好文   时间:2014-07-23 12:27:06    阅读次数:252
OJ1 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-07-23 12:03:26    阅读次数:287
Merge Two Sorted Lists leetcode java
题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 题解:....
分类:编程语言   时间:2014-07-23 12:01:36    阅读次数:257
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!