C********e 发帖数: 492 | 1 public double findMedianSortedArrays(int A[], int B[]) {
int len = A.length + B.length;
if (len % 2 == 1) {
return findKthSortedArrays(A, B, len / 2 + 1, 0, 0);
} else {
int left = findKthSortedArrays(A, B, len / 2, 0, 0);
int right = findKthSortedArrays(A, B, len / 2 + 1, 0, 0);
return (left + right) * 1.0 / 2;
}
}
private int findKthSortedArrays(int A[], int B[], int k, int startA, int
startB) {
... 阅读全帖 |
|
t*****9 发帖数: 569 | 2 用动态规划如何?
class FindMinWindow
{
private static readonly int[] A = { 1,1,1,1,2,1,1,1,1,3 };
private static readonly int[] Q = { 1,1,1,1,3 };
public static Point FindWindow(int startA, int startQ, bool
firstCall)
{
if (Q.Length <= startQ) return new Point(startA, 0);
if (A.Length <= startA) return new Point(startA, Int32.MaxValue);
List valueList = FindValue(startA, Q[startQ]);
i... 阅读全帖 |
|
a***a 发帖数: 739 | 3 两个排序的数组A, B, 比如:
int[] A = { 0, 4, 7};
int[] B = { 2, 3, 8, 10};
寻找两个数组合起来kth最大的,比如
findKthLargest(A, B, 1) return 10
findKthLargest(A, B, 3) return 7
http://www.glassdoor.com/Interview/Take-two-sorted-arrays-and-f
大家看看我的方法对不对。
public static int findKthLargest(int[] A, int[] B, int k){
int startA=Math.max(0,A.length-k), startB=Math.max(0, B.length-k);
int endA=A.length-1, endB=B.length-1;
while (startA<=endA && startB<=endB){
int midA = (startA+endA)/2;
int midB = (st... 阅读全帖 |
|
S*********g 发帖数: 24893 | 4 【 以下文字转载自 Stock 讨论区 】
发信人: StephenKing (金博士), 信区: Stock
标 题: 市面上流通1358种电子货币,包括ByteCoin
发信站: BBS 未名空间站 (Fri Dec 15 00:59:47 2017, 美东)
# Name Symbol Market Cap Price Circulating Supply Volume (
24h) % 1h % 24h % 7d
1
Bitcoin BTC $290,617,804,480 $17,358.40 16,742,200 $15,
825,500,000 -0.36% 5.62% 3.15%
2
Ethereum ETH $63,827,563,522 $662.47 96,348,146 $3,723,
910,000 -0.48% -10.50% 52.62%
3
Bitc... 阅读全帖 |
|
g*****e 发帖数: 282 | 5 把首尾两个index都传进去就可以了
search(int[] a, int startA, int endA, int[] b, int startB, int endB) |
|
g*****e 发帖数: 282 | 6 把首尾两个index都传进去就可以了
search(int[] a, int startA, int endA, int[] b, int startB, int endB) |
|
d**********6 发帖数: 4434 | 7 其实你稍稍修改一下就行
startA=A.length-k
startB=B.length-k |
|
S*********g 发帖数: 24893 | 8 【 以下文字转载自 Stock 讨论区 】
发信人: StephenKing (金博士), 信区: Stock
标 题: 市面上流通1358种电子货币,包括ByteCoin
发信站: BBS 未名空间站 (Fri Dec 15 00:59:47 2017, 美东)
# Name Symbol Market Cap Price Circulating Supply Volume (
24h) % 1h % 24h % 7d
1
Bitcoin BTC $290,617,804,480 $17,358.40 16,742,200 $15,
825,500,000 -0.36% 5.62% 3.15%
2
Ethereum ETH $63,827,563,522 $662.47 96,348,146 $3,723,
910,000 -0.48% -10.50% 52.62%
3
Bitc... 阅读全帖 |
|
S*********g 发帖数: 24893 | 9 # Name Symbol Market Cap Price Circulating Supply Volume (
24h) % 1h % 24h % 7d
1
Bitcoin BTC $290,617,804,480 $17,358.40 16,742,200 $15,
825,500,000 -0.36% 5.62% 3.15%
2
Ethereum ETH $63,827,563,522 $662.47 96,348,146 $3,723,
910,000 -0.48% -10.50% 52.62%
3
Bitcoin Cash BCH $29,779,262,625 $1,766.66 16,856,250 $2
,532,880,000 -1.05% -5.14% 21.33%
4
Ripple ... 阅读全帖 |
|
c*********n 发帖数: 87 | 10 我觉得你是要看group的差异的话,应该还需要一个group indicator,然后用starta,
这样才能test group 差异。
day censorflag count group
1 0 5 1
1 1 10 0
2 0 5 0
2 1 8 1
proc lifetest data=**** method=lt;
time day*censorflag(0);
freq count;
strata group;
test group;
run;
我要看的是 group 之间的差异,例如两个survival function是不是有显著性差异。 |
|
p********a 发帖数: 5352 | 11 难道不是stratification后取高端STARTA再MATCH?另外,add interaction/higher
order terms.
Exact match什么意思啊?都是分布而已,不可能一模一样吧 |
|