注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 匿名 于 2022-3-30 09:28 编辑
Tower 的 OA:75 分钟四道题1. 一道选择题,创建一个全局变量,可以在所有modules下面使用。
2. Rolling String的变种。输入的第二个array不是数字而是两个数字一个字母,字母用 L 或 R 代表向左还向右。
Given a string S and an array roll where roll represents rolling first roll[i] characters in the string, the task is to apply every roll[i] on the string and output the final string. Rolling means increasing the ASCII value of character, like rolling ‘z’ would result in ‘a’, rolling ‘b’ would result in ‘c’, etc.
Consider a string s, composed of english lowercase letters. Thre are two kinds of operations you can perform on S:
1) Roll Forwardtag1.tag2.tag3~name
tag1.tag2~value
Here, tag2 is nested within tag1, so attributes of tag2 are accessed as tag1.tag2~<attribute>. Results of the queries are:
Query Value
tag1~value "value"
tag1.tag2.tag3~name "Not Found!"
tag1.tag2.tag3~final "final"
[/i][/i] |