码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Just like normal variables,
Just like normal variables, pointers can be declared constant. There are two different ways that pointers and const can be intermixed, and they are very easy to mix up. To declare a const pointer, ...
分类:其他好文   时间:2014-07-12 21:20:23    阅读次数:165
Leetcode:Swap Nodes in Pairs 单链表相邻两节点逆置
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. Y...
分类:其他好文   时间:2014-07-12 20:39:17    阅读次数:225
ACdream 1139(Sum-逆元)
J - Sum Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) SubmitStatus Problem Description You are given an N*N digit matrix and you can get several horizont...
分类:其他好文   时间:2014-07-12 20:26:54    阅读次数:269
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 addBinary(String a, String b) { ...
分类:其他好文   时间:2014-07-12 19:42:26    阅读次数:168
Java Word Ladder(字梯)
问题: Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one letter can be changed at a time Each intermediate wo...
分类:编程语言   时间:2014-07-12 19:21:38    阅读次数:290
poj 1753 Flip Game
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 29865   Accepted: 12943 Description Flip game is played on a rectangular 4x4 field with two-sided p...
分类:其他好文   时间:2014-07-12 19:15:30    阅读次数:136
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 numbers such that they add up to the target, whe...
分类:其他好文   时间:2014-07-12 19:06:27    阅读次数:204
数学图形(1.35)Kappa curve
不知道这个曲线和那个运动品牌背靠背有什么关系.阿迪原先的商标是个三叶草,难道背靠背也是由数学图形来的?以下是维基上的解释.In geometry, the kappa curve or Gutschoven's curve is a two-dimensional algebraic curve r...
分类:移动开发   时间:2014-07-12 15:00:42    阅读次数:324
hdu 2492 Ping pong 线段树
给定一个序列,求出一共有多少个三元组(ai,aj,ak),使得i#include #define maxn 100200#define N 20100int sum[maxn*4];int lmax[N],lmin[N],rmax[N],rmin[N];int ans[N];void pushup(...
分类:其他好文   时间:2014-07-12 14:39:08    阅读次数:174
hdu 1059 Dividing 多重背包
就是看能不能装满给定容量的背包。#include #include int dp[200000],a[15];int main(){ int cas=0,c; int i,j,k; while(1) { int sum=0; cas++; ...
分类:其他好文   时间:2014-07-12 14:35:59    阅读次数:188
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!