




付费下载
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 亚马逊 2022 技术岗面试题第1题: A standard 52-card deck, which contains 2, 3, , J, Q, K, A. Pick four cards from the deck as a hand. Provide a function to figure out who is the winner of given two hands. There are different types: T1. Any four cards of the same rank. In this type, the bigger card decides who w
2、ins. For example: 3,3,3,3 6,6,6,6 第2题: T2. Any string with all four cards, and in such case (consecutive), A can count as either a high or a low card. Otherwise, A is a highest card. In this type, the highest card decides who wins. For example: A,2,3,4 J,Q,K,A 第3题: T3. Any three cards of the same ra
3、nk, In this type, the higher three same cards wins. For example: 3,3,3,2 2,2,2,A 第4题: T4. Any two cards of the same rank together with another two cards of the same rank. In this type, if two hands share same higher Pair, the bigger another Pair decides who wins. Otherwise, bigger Pair wins. For exa
4、mple: 3,3,4,4 4,2,4,2 第5题: T5. Any two cards of the same rank. In this type, bigger Pair wins. If two hands share same Pair, the bigger Third decides who wins. Otherwise, the bigger Fourth wins. For example: 3,3,7,4 3,3,7,5 第6题: T6. Any hand not in the above-mentioned hands. In this type, the highes
5、t card decides who wins. For example: A,K,Q,9 10,Q,A,K We dont take the suit into consideration. If two hands in different type, the rule is: T1T2T3T4T5T6 You will get two lines as input: 6,3,4,5 3,4,5,6 You should output the result: 0 If the first two line is bigger than the second line, the result
6、 should be 1. If the first line is smaller than the second line, the result should be -1. If they are equal, you should return 0. If a participator cheats in this game, the number of the same card will be more than four in the two hands. In this case, you should return -2. Symmetric number is a kind
7、 of non-negative number which looks the same as its inversion. For example, ”12321”is a symmetric number. Given any number n represented by a string, find the next symmetric number which is bigger than n. Here are two examples, Sample 1: Input: 123 Output: 131 Sample 2: Input: 12321 Output: 12421 第7
8、题: Common Ancestor(Programming) Question: A endless Complete Trinary Tree. Node ID is its back-and-forth order in level travel. Find the closest common ancestor. (“Complete Trinary” means each node has three children, neither more or less) Example: The node 13 and 15 have a closest common parent12 The node 16 and 10 have a closest common parent 1 If one Node is the ancestor of the another one, that Node is the clos
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 语文课上的一次小游戏记事作文9篇
- 媒体投放与传播战略合作协议具体内容书
- 2025年电工特种作业操作证考试试卷(高级)案例分析
- 2025年征信考试题库:征信数据分析挖掘信用风险分析试题
- 2025年西式烹调师高级(特色料理制作与市场推广)职业技能鉴定试卷
- 健康生活体验中心商业合作协议
- 小熊的故事动物童话作文7篇
- 2025年锅炉操作员特种作业操作证考试试卷(节能环保篇)
- 2025年海南省事业单位招聘考试综合类专业技能试题集
- 2025年初中历史七年级下册阶段检测试卷模拟试题及答案
- 安全生产管理台账(合集)
- 福建省厦门市第一中学2025届七下英语期末质量跟踪监视试题含答案
- 2024年吉林省国资委监管企业招聘真题
- 大学语文试题及答案 二
- 互联网女皇AI报告:人工智能趋势报告(双语翻译版本)
- 2025年西藏事业单位招聘考试职业能力倾向测验试卷(民族医药类)
- 结构动力学完整版本
- 2025年八年级数学下学期期末总复习八年级数学下学期期末测试卷(2)(学生版+解析)
- 农村供水水质管理制度
- T/COSHA 12-2022研学旅行安全工作规范
- T/CIE 149-2022霍尔电推进系统点火测试规范
评论
0/150
提交评论