Citadel SDE Intern OA | Citadel Acreage |Citadel SDE Assessment

Citadel SDE Intern OA

In the highly competitive fintech field, Citadel, as an industry pioneer, has always attracted the attention of numerous outstanding students. For those students aspiring to be Software Development Engineer (SDE) interns, Citadel SDE Intern OA is undoubtedly a crucial threshold on the path to their dream internship positions. For those students aspiring to be Software Development Engineer (SDE) interns, Citadel SDE Intern OA is undoubtedly a crucial threshold on the path to their dream internship positions.

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 sale
  • productPrices[n]: each is the correct price of products[i]
  • productSold[m]: each is the name of an item sold
  • soldPrice[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. There should be a space between the word and the frame on both sides. should 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
| 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 recommended For each user, output the recommended friend's index or -1 if none.

Example.
n = 5, friendships = [[0,1], [0,2], [1,3], [2,3], [3,4]]

Reference

Citadel Engineering Careers
Citadel-OA-Questions on LeetCode

We provide services for writing Amazon online assessments (OA), proxy interviews, and interview assistance. For OA writing service, we guarantee a For OA writing service, we guarantee a perfect score. Contact us Now to make an appointment.

author avatar
azn7u2@gmail.com
END
 0
Comment(没有评论)