题目 找出能被两个给定参数和它们之间的连续数字整除的最小公倍数。 范围是两个数字构成的数组,两个数字不一定按数字顺序排序。 例如对 1 和 3 —— 找出能被 1 和 3 和它们之间所有数字整除的最小公倍数。 smallestCommons([1, 5]) 应该返回一个数字。 smallestCom ...
分类:
其他好文 时间:
2016-09-05 19:22:11
阅读次数:
127
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th ...
分类:
其他好文 时间:
2016-08-29 08:04:09
阅读次数:
243
Implement a stack with min() function, which will return the smallest number in the stack. It should support push, pop and min operation all in O(1) c ...
分类:
其他好文 时间:
2016-08-25 23:48:23
阅读次数:
163
题目大意:给你几个数字,选出一些数字组成一个整数,另外的组成另一个整数,求这两个数差的绝对值的最小值 Input The first line of input contains the number of cases to follow. For each case, there is one l ...
分类:
其他好文 时间:
2016-08-24 15:51:05
阅读次数:
199
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that i ...
分类:
其他好文 时间:
2016-08-24 00:56:04
阅读次数:
129
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th ...
分类:
其他好文 时间:
2016-08-19 09:53:14
阅读次数:
127
原题链接: http://poj.org/problem?id=2718 题意: 给你几个数字,可以分成两个子集,然后分别按一定顺序排列组成一个数,求出这两只值差的绝对值的最小值。 分析: 反正也是刷着玩,果断先交一波全排列枚举的代码,果断TLE,然后开始想正解。 稍微想想,既然要差最小,肯定是两个 ...
分类:
其他好文 时间:
2016-08-16 01:55:23
阅读次数:
248
题目: You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element fro ...
分类:
编程语言 时间:
2016-08-12 13:33:21
阅读次数:
225
题目: Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Example: 分析:采用 ...
分类:
编程语言 时间:
2016-08-12 11:36:26
阅读次数:
191