在竞争激烈的金融科技领域,作为行业先驱的Citadel一直吸引着众多优秀学生的关注。对于那些渴望成为软件开发工程师(SDE)实习生的学生而言,Citadel SDE实习生在线申请系统无疑是通往理想实习岗位道路上的关键门槛。
1. Citadel Intern OA : Price Check – RPA
There is a shop with old-style cash registers. Rather than scanning items and pulling the price from a database, the price of each item is typed in manually.This method sometimes leads to errors. Given a list of items and their correct prices, compare the prices to those entered when each item was sold.Determine the number of errors in selling prices.
Example
products = [‘eggs’, ‘milk’, ‘cheese’]
productPrices = [2.89, 3.29, 5.79]
productSold = [‘eggs’, ‘eggs’, ‘cheese’, ‘milk’]
soldPrice = [2.89, 2.99, 5.79, 3.29]
| Product | Actual | Expected | Error |
|---|---|---|---|
| eggs | 2.89 | 2.89 | 0 |
| eggs | 2.99 | 2.89 | 1 |
| cheese | 5.97 | 5.79 | 1 |
| milk | 3.29 | 3.29 | 0 |
The second sale of eggs has a wrong price, as does the sale of cheese. There are 2 errors in pricing.
Function Description
Complete the function priceCheck in the editor below.
products[n]: each is the name of an item for saleproductPrices[n]: each is the correct price ofproducts[i]productSold[m]: each is the name of an item soldsoldPrice[m]: each is the recorded sale price for that item
Returns: int — the number of sale prices that were entered incorrectly.
Constraints:
- 1 ≤ n ≤ 105
- 1 ≤ m ≤ n
- 1.00 ≤ productPrices[i], soldPrice[j] ≤ 100000.00
2. Citadel Intern OA : Framing Text
Write a function that takes a string containing more than one word and returns a string that shows each word, one per line, in a rectangular frame. Thereshould be a space between the word and the frame on both sides. For example, “Hello World in a frame” should be printed as:
+-------+
| Hello |
| World |
| in |
| a |
| frame |
+-------+
def print_boxed_text(input_str):
# Your implementation here
return framed_string
if __name__ == '__main__':
s = input().strip()
print(print_boxed_text(s))
3. Citadel Intern OA : Recommendation System
Implement a prototype of a friend recommendation system for a social media application.
There are n users indexed 0 to n–1, and m friendships given as pairs. Suggest user x to user y if they are not friends and share the maximum number of mutual friends. Break ties by choosing the lowest index. For each user, output the recommendedfriend’s index or –1 if none.
Example:
n = 5, friendships = [[0,1], [0,2], [1,3], [2,3], [3,4]]
參考資料
Citadel Engineering Careers
Citadel-OA-Questions on LeetCode
我们提供亚马逊在线评估(OA)写作服务、代理面试服务及面试辅助服务。对于OA写作服务,我们保证获得满分。 聯絡我們 現在預約。