码迷,mamicode.com
首页 >  
搜索关键字:example 复杂条件查询    ( 17809个结果
几道算法题
1.Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-...
分类:其他好文   时间:2014-06-02 17:36:53    阅读次数:234
Android学习笔记_JNI_c调用java代码
1、编写native方法(java2c)和非native方法(c2java):package com.example.provider;public class CallbackJava { // C调用java空方法 public void helloFromJava() { ...
分类:移动开发   时间:2014-06-02 16:42:34    阅读次数:413
【leetcode】 Text Justification
问题: 给定一个字符串数组words,一个整数L,将words中的字符串按行编辑,L表示每行的长度。 要求: 1)每个单词之间至少是有一个空格隔开的。 2)最后一行每个单词间只间隔一个空格, 最后一个单词后不足L长度的用空格填充。 3)除最后一行外,其他行进行填充长度的空格要均分,不能均分的,将余数代表的空格数依次填充在行左。 For example, words: ["Th...
分类:其他好文   时间:2014-06-01 15:43:03    阅读次数:297
LeetCode: Unique Binary Search Trees [095]
【题目】 Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \ / / / \ 3 2 1 ...
分类:其他好文   时间:2014-06-01 15:34:24    阅读次数:231
LeetCode: Unique Binary Search Trees II [096]
【题目】 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3 3 2 1 \ / / / \ ...
分类:其他好文   时间:2014-06-01 15:33:45    阅读次数:297
LeetCode: Reverse Linked List II [092]
【题目】 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2->5->NULL. Note: Given m, n satisfy the following condition: 1 ≤ m ≤ n ≤ length of list. 【题意】 ...
分类:其他好文   时间:2014-06-01 15:08:34    阅读次数:237
【leetcode】Permutations
问题: Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,1]. 分析: ...
分类:其他好文   时间:2014-06-01 15:04:42    阅读次数:259
【leetcode】Permutations II
问题: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and...
分类:其他好文   时间:2014-06-01 13:03:12    阅读次数:324
LeetCode: Restore IP Addresses [093]
【题目】 Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return ["255.255.11.135", "255.255.111.35"]. (Order does not matter) 【题意】 给定一个字符串,恢复并返回所有符合条件的IP串 【思路】...
分类:其他好文   时间:2014-06-01 13:01:56    阅读次数:295
LeetCode: Binary Tree Inorder Traversal [094]
【题目】 Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. Note: Recursive solution is trivial, could you do it iteratively? confused what "{1,#,2...
分类:其他好文   时间:2014-06-01 13:01:23    阅读次数:279
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!