注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 程西嗷 于 2023-6-26 15:28 编辑
新人求米)
岗位:
好消息是申请了立刻就有OA,随申随答。坏消息是Co-op只有在校学生可以申请
第一题:
Amazon has a string of categories of items purchased by a particular customer, each represented as a lowercase English letter. To analyze customer behavior we define a metric called the Maximacount of a category. It is the number of indices where the frequency of some category c is maximum among all categories present in the prefix of i.
More elaboratively. MaximaCount of character, char, representing a category is defined as the number of inest.
Note:
1. A sub-list is obtained by removing some nodes from the head and some nodes from the tail of the linked list.
2. Solve the problem in constant extra space.
The first line contains an integer n, the number of elements in the list. Each i of the next n lines contains an integer denoting the ith element of the list. |