TikTok AMS Grad Assessment 2024 start – 6 Nov to 10 Nov (Generic) OA record


 November 7, 2023


1.CPU Processes

A Unix system administrator notices that a production server is running slower than usual. They suspect that a rogue process is consuming an excessive amount of CPU resources. The administrator wants to identify the top CPU-consuming processes, how long they have been running, and which user initiated each of these processes.

Which command should the system administrator use to list the top CPU-consuming processes along with the username of the person who started each process and the elapsed time since each process was started?

Pick ONE option

  • ps aux –sort=-%cpu | head
  • top -u
  • netstat -tuln
  • find / -user root -name “*.log”

2.Phi Function Calculation

A team of cryptographers develops a Python function, calculate_phi(n), in their cryptographic software. This function performs three primary tasks: it generates a list of prime numbers up to ‘n’, checks if ‘n’ is a prime number, and performs a specific calculation based on whether ‘n’ is prime. The code structure is as follows.

In the context of the calculate(n, primes) inner function, which of the following statements is accurate?

Pick ONE option

  • It returns n-1 only when ‘n’ is identified as a prime number.
  • It employs a lambda function to derive a specific mathematical value.
  • It correctly modifies the value of ‘phi’ for each prime factor of ‘n’.
  • It works efficiently for very large numbers, up to 10^12.

3.Bandwidth Distribution

Total bandwidth is total_bandwidth units and there are n API endpoints. The i^th endpoint needs a bandwidth of bandwidth[i] to be functional, and the expected number of requests for the endpoint is request[i]. Given total_bandwidth, bandwidth, and request, find the maximum total number of requests that can be served by optimally allocating bandwidth to different endpoints.

4.Message Delivery System

In this task, a basic message delivery service is to be implemented that has a rate-limiting algorithm that drops any message that has already arrived in the last k seconds.

Given the integer k, a list of messages as an array of n strings, messages, and a sorted integer array timestamps representing the time at which the message arrived, for each message report the string “true” if the message is delivered and “false” otherwise.







Question 1 is a typical Unix system management scenario, evaluating the candidate’s understanding of system process monitoring. It serves to assess the practical ability to handle system performance issues.

Question 2 combines programming with mathematical knowledge, testing the candidate’s ability to program solutions for mathematical computations. Its structure is clear and challenges algorithmic optimization skills.

Question 3 is an optimization problem related to resource allocation, testing the candidate’s ability to solve practical problems using greedy algorithms. It involves algorithm design and problem-solving skills.

Question 4 involves designing a rate-limited message delivery system, examining the candidate’s knowledge of data structures and algorithms, particularly with regard to time efficiency.



Accepting bookings, ensure AC.

We can assist you online with any online assessment, and we can bypass any cheating detection mechanisms, including those that require the use of a camera

contact me to slove OA