码迷,mamicode.com
首页 >  
搜索关键字:palindrome numbers    ( 9163个结果
hust 1377 - Sequence
题目描述Given a number sequence whose length is n, you can delete at most k numbers in the sequence.After that you are asked to answer the maximum length ...
分类:其他好文   时间:2014-05-19 22:21:32    阅读次数:304
two sum
Question 1: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...
分类:其他好文   时间:2014-05-19 09:35:41    阅读次数:321
表达式求值
#ifndef MAINFUNC_H#define MAINFUNC_H#include #include #include #include //1. Get the numbers//2. Modify the expression like (1+1*1)*(1-1); 1 represent...
分类:其他好文   时间:2014-05-18 19:54:02    阅读次数:514
【LeetCode】Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-05-18 02:11:19    阅读次数:302
【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-nega...
分类:其他好文   时间:2014-05-18 01:25:07    阅读次数:288
hust 1471 Tobor and Numbers
题目描述After the hard tasks, It’s the easy time for Y.G.Tobor and Y.D.I.Isha is a friend of Y.D.I, as he thinks Tobor is smart too, he give Tobor a probl...
分类:其他好文   时间:2014-05-17 15:20:34    阅读次数:248
[leetcode]_Palindrome Number
判断integer是否为回文串(负数全部不为回文串)思路很直接,提取出integer中的每一位,一头一尾进行比较是否相同。一次AC , 直接上代码:public boolean isPalindrome(int x) { if(x = 0 && x 0){ ...
分类:其他好文   时间:2014-05-16 00:24:44    阅读次数:386
Leetcode 线性表 数 Add Two Numbers
题意:给定两个代表数字的链表,每个节点里存放一个digit,数字是逆方向的,将这两个链表相加起来 思路: 1.i, j遍历l1,l2至最长,短的补零 2..设置一个进位变量c, 第i次遍历 l1,l2,c的和除以10进位,mod10留在这一位 3.出循环后还要检查是不是还有进位 复杂度:O(m+n), 空间O(m+n)...
分类:其他好文   时间:2014-05-15 13:38:03    阅读次数:258
【LeetCode】Two Sum
Two SumGiven 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...
分类:其他好文   时间:2014-05-15 10:48:59    阅读次数:322
【LeetCode】- 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 ta...
分类:其他好文   时间:2014-05-15 00:04:39    阅读次数:377
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!