注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 helenhelen 于 2020-3-28 11:33 编辑
.--
Timeline:
9月底内推
11月中做的OA 传送门 -> https://www.1point3acres.com/bbs/thread-571801-1-1.html
12月中phone interview
题目背景:
有一个游戏 叫Ghost 给一个"dictionary" 两个人轮流说字母 说出字母组成给的字典里的单词 或者不可能组成字典里的单词的那个人 就输了
Ex:
dict = {"bread", "apple"}.google и
从第一个人开始
b r e a d -> player 1 lose
b c -> player 2 lose
. 1point 3 acres
我们要写一个class 来支持这个游戏
每一个player 是一个这个class的instance
然后要写一个method, input 是一个字母 (上一个人说的字母) output 也是一个字母 (我这轮说的字母) 并且在选择字母的时候 选一个不会让我立刻输的字母
这个class 需要保留之前说过的东西
ex:
dict = {"bread", "ape"}
p1.class()
p2.class()
p1.method("") -> a
p2.method("a") -> p.google и
p1.method("p") -> e -> lose
|