亚马逊笔试题目
笔试题目篇一
1.判断一年是否为闰年的'方法
2.非递归实现exists方法
template
class BinaryTree{
protected:
T* _data;
BinaryTree
BinaryTree
};
template
class BST:public BinaryTree
public:
virtual bool exists(const T& item> const;
};
3.找到下面的bugs
#include
#include
void foo(int a ,char*b)
{
b=(char *)malloc(64);
snprintf(b,"you are %d years old!/n",a);
}
int main (void)
{
char *f;
foo(23,f);
printf("%s/n",b);
}
gn a subway traffic control objects/classes/modules would you best use for this
purpose?Please draw diagrams and write up class definitions to better illustrate your
e anything additional to clarify your design.
笔试题目篇二
Question:
We have an array representing customer’s shopping records.
For example, it’s an array like this:
custA, item1,
custB, item1,
custA, item2,
custB, item3,
custC, item1,
custC, item3,
custD, item2,
This array indicates that customer A bought item 1, customer B bought item 1, customer A bought item 2, customer B bought
item 3, etc..
For a given item X and shopping records array, write code to find out what else (item Y) was bought mostly by the customers
who bought item X.
For example, in above example, if X is item 1 then Y should be item 3.
Rules:
1. One customer can only buy one item once.
2. The mostly brought item should not be item X.
3. If no customer brought item X, then return “None”
4. If all the customers who brought item X only brought item X, then return “None”
5. The first line of input is the item X. The second line of input is the shopping record array, this shopping record array is
split by space.
6. If there are many other mostly brought items which have equally brought times, then return any one of those items.
Examples:
Input1:
item1
custA item1 custB item1 custA item2 custB item3 custC item1 custC item3 custD item2
Output1:
item3
Input2:
item2
custA item1 custB item1 custC item1 custA item2 custB item3 custA item3
Output2:
item1
(The output2 can be item3 too)
-
2016年南京师范大学硕士研究生复试录取办法
南京师范大学已公布了2016年硕士研究生复试的录取办法,请上线考生及时查看信息,了解考研复试的相关注意事项,下面是小编搜集整理的详细资料,供大家阅读查看。一、基本原则1.科学选拔,保证质量。树立科学的人才选拔理念,坚持能力与知识考核并重,着力加强对考生创新能...
-
2016年云南大学报考点现场确认须知
2017年的院校考研现场确认公布还没有公布了,下面是小编搜集整理的2016年云南大学报考点现场确认须知,供考生们阅读参考。各位报考考点为云南大学(5306)的考生:为做好我考点2016年全国硕士研究生招生考试报名工作,确保报名现场确认工组织实施规范有序、平稳顺利,根据...
-
四川理工学院2016考研现场确认要求及注意事项
一、网报时间:1、应届本科毕业生网上预报名时间为2015年9月24日至27日9:00-22:00。2、网上报名时间为2015年10月10日至31日每天9:00-22:00。二、现场确认时间、地点:1、时间:2015年11月7日至12日(上午9:00-12:00、下午14:00-17:00)11月7-8日(周末):宜宾学院、内江...
-
减负考研成本,清扫考研障碍
表面风光,内心彷徨;容颜未老,心已沧桑。大学生本应朝气蓬勃,最近这条流行于网上的段子,被越来越多的大学生挂在嘴边。就业、考研和人际关系成为大学生最大困扰。同样在考研的路途中也会遭遇到如成本、人际关系等障碍,在接下来的暑期阶段,如何更加顺利地走过?考研辅导...