码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
[LeetCode]Single Number
Given an array of integers, every element appears twice except for one. Find that single one....
分类:其他好文   时间:2014-05-15 07:20:39    阅读次数:264
Leetcode 树 Unique Binary Search TreesII
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Binary Search Trees II  Total Accepted: 7349 Total Submissions: 27648 Given n, generate all structurally unique ...
分类:其他好文   时间:2014-05-15 07:02:36    阅读次数:252
CareerCup之1.6 Rotate Image
【题目】 原文: 1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place? 译文: 一张图像表示...
分类:其他好文   时间:2014-05-15 05:43:35    阅读次数:240
LeetCode-004 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 digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Out...
分类:其他好文   时间:2014-05-15 05:13:49    阅读次数:306
Leetcode 树 Binary Tree Preorder Traversal
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Binary Tree Preorder Traversal  Total Accepted: 17948 Total Submissions: 51578 Given a binary tree, return the preorder tra...
分类:其他好文   时间:2014-05-15 04:37:26    阅读次数:283
LeetCode 006 ZigZag Conversion
【题目】 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSI...
分类:其他好文   时间:2014-05-15 04:30:57    阅读次数:313
【LeetCode】Plus One
题目 Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 解答 本题考察进位问题,注...
分类:其他好文   时间:2014-05-15 04:16:56    阅读次数:245
【LeetCode】Search a 2D Matrix
题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer...
分类:其他好文   时间:2014-05-15 03:41:11    阅读次数:257
LeetCode-005 Longest Palindromic Substrin
【题目】 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 【题意】 题意是找出字符串S中最长回文子串,S最长为1000,保证有唯一解 【思路】 原字符串用特殊字符#间隔,如下所示: #a...
分类:其他好文   时间:2014-05-15 03:31:25    阅读次数:299
leetcode题目:Palindrome Partitioning 和Palindrome Partitioning II
题目一: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "aab", Return [ ...
分类:其他好文   时间:2014-05-14 15:10:01    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!