由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 问道题
相关主题
Anyone knowing how to shuffle a deck of cards in Java?这题咋做啊?
how to shuffle a deck of cards?刚看了下shuffle算法。发现有个问题
一道面试题报个T家的电面据
Apple 电面请教几个问题
java: use vector to shuffle a deck of Card 问题设计card deck问题,还有shuffle function,大家要搞清楚呀
再问Amazon的card设计下午电面MS
Randomly shuffle decks of cards问一下shuffle card问题
shuffle card 算法median of N^2 numbers across N machines
相关话题的讨论汇总
话题: deck话题: portion话题: shuffle话题: bottom话题: top
进入JobHunting版参与讨论
1 (共1页)
P*******b
发帖数: 1001
1
Given a deck of nCards unique cards, cut the deck iCut cards from top and pe
rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
card from the top portion of the deck followed by the bottom card from the
bottom portion of the deck followed by the next card from the top portion, e
tc., alternating cards until one portion is used up. The remaining cards go
on top. The problem is to find the number of perfect shuffles required to re
turn the deck to its original order. Your
P*******b
发帖数: 1001
2
没人感兴趣?

pe
bottom
the
e
go
re

【在 P*******b 的大作中提到】
: Given a deck of nCards unique cards, cut the deck iCut cards from top and pe
: rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
: card from the top portion of the deck followed by the bottom card from the
: bottom portion of the deck followed by the next card from the top portion, e
: tc., alternating cards until one portion is used up. The remaining cards go
: on top. The problem is to find the number of perfect shuffles required to re
: turn the deck to its original order. Your

s*****t
发帖数: 737
3
请问后续的shuffle是可以自己定 iCut吗?还是说每次都是随机的?

pe
bottom
the
e
go
re

【在 P*******b 的大作中提到】
: Given a deck of nCards unique cards, cut the deck iCut cards from top and pe
: rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
: card from the top portion of the deck followed by the bottom card from the
: bottom portion of the deck followed by the next card from the top portion, e
: tc., alternating cards until one portion is used up. The remaining cards go
: on top. The problem is to find the number of perfect shuffles required to re
: turn the deck to its original order. Your

i***1
发帖数: 95
4
感兴趣的。想了下。没想到什么好办法。
P*******b
发帖数: 1001
5
我感觉iCut不是每次都是随机

【在 s*****t 的大作中提到】
: 请问后续的shuffle是可以自己定 iCut吗?还是说每次都是随机的?
:
: pe
: bottom
: the
: e
: go
: re

s*****t
发帖数: 737
6
Okay, it seems to me that
just keep cutting the same iCuts and then shuffle the cards
finally, you will get the original deck.
Just I could not get the number of times of shuffle and could not prove it.
I suspect it is a ring problem, needs abstract algebra to solve it.

【在 P*******b 的大作中提到】
: 我感觉iCut不是每次都是随机
h**k
发帖数: 3368
7
看不懂,能给个例子么?

pe
bottom
the
e
go
re

【在 P*******b 的大作中提到】
: Given a deck of nCards unique cards, cut the deck iCut cards from top and pe
: rform a perfect shuffle. A perfect shuffle begins by putting down the bottom
: card from the top portion of the deck followed by the bottom card from the
: bottom portion of the deck followed by the next card from the top portion, e
: tc., alternating cards until one portion is used up. The remaining cards go
: on top. The problem is to find the number of perfect shuffles required to re
: turn the deck to its original order. Your

1 (共1页)
进入JobHunting版参与讨论
相关主题
median of N^2 numbers across N machinesjava: use vector to shuffle a deck of Card 问题
请教一题算法小问题再问Amazon的card设计
请教一个题目Randomly shuffle decks of cards
Google电面面经 + onsite求祝福shuffle card 算法
Anyone knowing how to shuffle a deck of cards in Java?这题咋做啊?
how to shuffle a deck of cards?刚看了下shuffle算法。发现有个问题
一道面试题报个T家的电面据
Apple 电面请教几个问题
相关话题的讨论汇总
话题: deck话题: portion话题: shuffle话题: bottom话题: top