CS-OA cs-vo Faang

Welcome to [TikTok] AMS Grad Assessment2024 Start – 15Jan to 19 Jan (Generic)

本周的tiktok又开放啦,tiktok的秋招到现在一直保持的高强度的OA 发放。This week's TikTok has opened up again, and TikTok's autumn recruitment has maintained a high intensity of OA distribution.

给不熟悉tiktok OA的朋友们科普一下,tiktok的OA每两周开放一次,当第一次OA未通过时可以再次申请两周后的OA,一般是周一开始做,周五截止。潜规则是周五做OA的人一般不会通过,而越早完成通过率越高。For those who are not familiar with TikTok's OA, it opens every two weeks. When the first OA is not passed, you can reapply for the OA after two weeks, which is generally started on Monday and ends on Friday. The unwritten rule is that people who do the OA on Friday generally do not pass, and the earlier you complete it, the higher the pass rate.

题目由2个多选题和3个算法题构成。本周中第五题是随机的,而前4题是固定的。让我们看看本周的真题吧The questions consist of 2 multiple-choice questions and 3 algorithm questions. In this week's session, the fifth question is random, while the first four are fixed. Let's take a look at this week's real questions.

Q1 In the design of a caching system, an essential aspect is the eviction policy. This policy determines which items to remove from the cache when the cache is full and a new item needs to be added. Which pair of pseudo-code snippets correctly implement the Least Recently Used (LRU) and First In First Out (FIFO) cache eviction policies, respectively? Pick ONE OR MORE options

Q2 Tree Traversal plaintext A binary tree uses the following node structure.

Which pair of pseudo-code snippets correctly implement the inorder and the postorder traversals? Pick ONE OR MORE options


重点是算法题,其中Q3 Q4的题目是固定的,Q5有多个版本

I won't post the options here, as I believe dedicated folks will prepare on their own.

The focus is on the algorithm questions, where Q3 and Q4 are fixed, and Q5 has multiple versions.

Q3. Load Balancer

Implement a prototype of a round-robin load-balancing algorithm.

There are n servers indexed from 1 to n, and m requests to be processed. The i-th request arrives at time arrival[i] and takes burstTime[i] time to execute. The load balancer assigns the request to the available server with the minimum index. A server that is assigned the i-th request is unavailable from time arrival[i] to arrival[i] + burstTime[i]. At arrival[i] + burstTime[i], the server is available to serve a new request.

Given n, arrival, and burstTime for each request, find the index of the server that executes it. If no server is available at the time, the request is dropped, and -1 is reported. If multiple requests arrive at the same time, the one with the smaller index is assigned first.


Q4 is the most difficult of all the questions. It's not feasible to convey the entire problem statement with text alone. Please contact me to obtain a screenshot of the question.

Q4. Transaction Simplification

Implement a prototype service to simplify a group of debt transactions.

Q5 v1.Cloud Connector

Some companies use clouds to have their website in different locations around the world tomake it faster for users to connect to their website and use their services. Each location has acapacity of number of users it can serve at the same time

Q5 v2. Element Frequency

Given an array of integers, arr, of size n, that represent the frequency of each element, for each element, do exactly one of these operations:


如果害怕自己解决不了OA,请扫码联系我 or telegram

If you're afraid that you can't solve the OA on your own, please scan the code to contact me or telegram

Leave a Reply

Your email address will not be published. Required fields are marked *