由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - java: use vector to shuffle a deck of Card 问题 (转载)
相关主题
[合集] 面试题: Shuffle a deck of cardsin-place N-way shuffle怎么做?
Help please! how to add a new card to the shuffled deck in vb关于linux diff 命令的一个问题 (转载)
Remove elements from multiple vectors in C++问个best practice
能帮我看看Ruby的这道题吗?C里面的数组拷贝
问一个随机排列的问题.Shuffle performance (C#)
讨论几个面试题求问一道数组shuffle的问题 (转载)
[合集] 面试问题Spark上怎么join avro format的数据?
问个很基础的问题Spark RDD
相关话题的讨论汇总
话题: card话题: vector话题: shuffle话题: deck话题: public
进入Programming版参与讨论
1 (共1页)
m*p
发帖数: 1331
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: mbp (Mac Book Pro), 信区: JobHunting
标 题: java: use vector to shuffle a deck of Card 问题
发信站: BBS 未名空间站 (Thu Mar 3 00:40:48 2011, 美东)
要求用vector实现shuffle a deck of Card,如下:
public class Card {
private int value;
Card(int v) {
value = v;
}

public void print(){
System.out.print(value+";");
}
}
public class DeckShuffle {

private final int num;
Vector deck = new Vector();
// implement this shuffle function. DO NOT USE Collections.shuffle() !!
public void shuffle(){
// your code goes here!
}

}
1 (共1页)
进入Programming版参与讨论
相关主题
Spark RDD问一个随机排列的问题.
Python哪个library可以快速建个soap web service?讨论几个面试题
deep learning 的时候要把所有数据都读到内存里?[合集] 面试问题
how to look the values in a vector in VC.NET问个很基础的问题
[合集] 面试题: Shuffle a deck of cardsin-place N-way shuffle怎么做?
Help please! how to add a new card to the shuffled deck in vb关于linux diff 命令的一个问题 (转载)
Remove elements from multiple vectors in C++问个best practice
能帮我看看Ruby的这道题吗?C里面的数组拷贝
相关话题的讨论汇总
话题: card话题: vector话题: shuffle话题: deck话题: public