题目链接 给出n个字符串, 将他们连在一起, 求连玩之后字典序最小的那种情况。 按a+b<b+a排序.... #include <iostream> #include <vector> #include <cstdio> #include <cstring> #include <algorithm>
分类:
编程语言 时间:
2016-03-02 09:28:12
阅读次数:
135
/** * Input an array of positive integers, arrange the integers to form new digits, * and output the smallest digit among all the new ones. * Input Ex
分类:
其他好文 时间:
2016-02-23 20:47:20
阅读次数:
265
Description: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid,
分类:
其他好文 时间:
2016-02-20 00:30:11
阅读次数:
179
题目链接 Problem Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or
分类:
其他好文 时间:
2016-02-09 17:25:10
阅读次数:
234
The trivial way, O(m + n): Merge both arrays and the k-th smallest element could be accessed directly. Merging would require extra space of O(m+n). Th
分类:
其他好文 时间:
2016-02-08 04:53:47
阅读次数:
381
Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbe
分类:
其他好文 时间:
2016-02-03 10:44:31
阅读次数:
130
题目: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ B
分类:
其他好文 时间:
2016-01-29 16:05:13
阅读次数:
141
题目描述输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。Given a collection of number segments, you are supposed to...
分类:
编程语言 时间:
2016-01-25 23:00:14
阅读次数:
333
/*** Return the smallest character that is strictly larger than the search character,* If no such character exists, return the smallest character in t...
分类:
其他好文 时间:
2016-01-24 08:09:56
阅读次数:
160
Given two array of integers(the first array is array A, the second array is array B), now we are going to find a element in array A which is A[i], and...
分类:
其他好文 时间:
2016-01-15 07:34:11
阅读次数:
170