码迷,mamicode.com
首页 >  
搜索关键字:two pointer    ( 13796个结果
apache http client vs urlconnection
Google has deprecated HttpClientChoose an HTTP ClientMost network-connected Android apps use HTTP to send and receive data. Android includes two HTTP ...
分类:其他好文   时间:2014-05-27 01:12:43    阅读次数:343
C %p
格式控制符“%p”中的p是pointer(指针)的缩写。指针的值是语言实现(编译程序)相关的,但几乎所有实现中,指针的值都是一个表示地址空间中某个存储器单元的整数。printf函数族中对于%p一般以十六进制整数方式输出指针的值,附加前缀0x。示例:int i = 1;printf("%p",&i);...
分类:其他好文   时间:2014-05-19 19:28:19    阅读次数:219
【leetcode】Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ...
分类:其他好文   时间:2014-05-19 15:50:28    阅读次数:447
LeetCode:Multiply Strings
题目链接Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-...
分类:其他好文   时间:2014-05-19 14:10:25    阅读次数:250
LeetCode:Add Two Numbers
题目链接 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si...
分类:其他好文   时间:2014-05-19 13:53:32    阅读次数:296
【LeetCode】Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".public class Solution { public String addBin...
分类:其他好文   时间:2014-05-19 12:15:49    阅读次数:220
【LeetCode】Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-05-19 12:05:23    阅读次数:386
LeetCode: Swap Nodes in Pairs [023]
【题目】 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You may not modify the values in the list, only nodes it...
分类:其他好文   时间:2014-05-18 08:37:57    阅读次数:370
[leetcode]:Two Sum
题目:给定一个数组,以及一个 target 值,target 表示目标和,要求在数组中找到两个数,xi,xj,使得 xi + xj = target。返回值是找到的两个数的下标索引,升序排序。假定至少存在一对解。 分析:对于要处理数组的问题,我们的理想状态都是给定的数组是有序的就好了,在有序后,我们就可以首位各放一个标记。类似于二分查找。 vector twoSum(vector &n...
分类:其他好文   时间:2014-05-18 08:04:03    阅读次数:234
HDU-4734-F(x)
Problem Description For a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x) = An * 2n-1 + An-1 * 2n-2 + ... + A2 * 2 + A1 * 1. Now you are given two numbers A and...
分类:其他好文   时间:2014-05-18 06:35:50    阅读次数:300
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!