Just finished taking trainees this week TikTok SDE OA (Online Assessment), and the whole set felt at a very comfortable pace.
There are four programming questions in total, and the overall difficulty is not too high, belonging to the kind of combination of "familiar questions and detailed implementation".
It took me 28 minutes to complete the whole process and I got all four questions AC in one go. Here are the full questions and my review.

T1 Monotonic Triplets
Problem Statement (in English).
You are given an array of integers arr. Your task is to determine whether each sequence of three elements in the array (arr[i], arr[i + 1], and arr[i + 2]) are monotonic.
Three consecutive elements are monotonic if their values are in a strictly increasing or strictly decreasing order.
Return an array of integers of length arr.length - 2, where the i-th element is equal to 1 If arr[i] < arr[i + 1] < arr[i + 2] or arr[i] > arr[i + 1] > arr[i + 2], and 0 otherwise.
Example:
arr = [1, 2, 1, -4, 5, 10]
output = [0, 1, 0, 1]
This question is basically a warm-up question, just iterate through all the triples.
The judgment condition is simple, takes O(n) time to get done, and has almost no pitfalls.
T2 Deck Shuffle
Problem Statement (in English).
You have a deck of cards numbered from 1 to n, where n is the total number of cards.
The cards are currently arranged in some order, and you want to sort them in ascending order (1, 2, 3, ..., n).
The only operation you can perform is a shuffle move: take k cards from the top of the deck and move them to the bottom, where k is any integer from 0 to n - 1.
Example:
arr = [5, 1, 2, 3, 4]
Simulate all possible values of k (0 to n-1) and perform a move operation to see if it turns out to be [1, 2, 3, ..., n].
The implementation is straightforward, as long as the logic is written correctly it will pass once.
TikTok OA likes this kind of "seemingly abstract, but actually enumerated" questions, the key is to be careful.
T3 Race Elimination
Problem Statement (in English).
All the competitors in a stock car race have completed their qualifying laps. Each lap, the driver with the current slowest "best " time is eliminated (that is, the highest personal best time). " time is eliminated (that is, the highest personal best time).
If multiple drivers tie for the slowest time, they are all eliminated.
You are given a two-dimensional string array with each driver's name and lap time in seconds for each lap.
Your task is to return the drivers in the order in which they were eliminated, ending with the last driver or drivers remaining.
When multiple drivers are eliminated on the same lap, their names should be listed alphabetically.
Example:
laps = [
["Harold 154", "Gina 155", "Juan 160" ], ["Juan 152", "Gina 153", "Harold 160" ],
["Juan 152", "Gina 153", "Harold 160"], ["Harold 148", "Gina 150", "Juan 151"].
["Harold 148", "Gina 150", "Juan 151"]
]
output = ["Juan", "Harold", "Gina"]
This question is more like a full simulation, examining a combination of dictionary, string parsing, and sorting.
Each round updates the player's best time and then finds the slowest (with the largest value) to eliminate.
Once the logic is understood, the implementation is not really complicated.
T4 Counting Black Squares
Problem Statement (in English).
For a grid of black and white cells with rows rows and cols columns, you're given an array black that contains the [row, column] coordinates of all the black cells in the grid.
Your task is to compute how many 2 x 2 submatrices of the grid contain exactly blackCount black cells, for each 0 ≤ blackCount ≤ 4.
As a result, you will return an array of 5 integers, where the i-th element is the number of 2 x 2 submatrices with exactly i black cells.
Example:
rows = 3, cols = 3, black = [[0, 0], [0, 1], [1, 0]]
output = [1, 2, 0, 1, 0]
This question favors the computational category, and the idea is:
Each black lattice appears in at most four 2 × 2 submatrices.
Enumerate all possible starting points (r, c), just count the number of black squares in it.
The implementation uses a hash collection to store the location of the black grid, the traversal range is small, and the time is easily controlled in O(rows × cols).
Overall Impression
The entire set of TikTok OA questions is on the regular side with no algorithmic traps.
The four questions were well distributed in terms of difficulty and covered each:
- Array base logic
- Simulation and Enumeration
- Status Updates and Sorting
- Two-dimensional traversal and counting
I had all smooth ACs in the Codesignal environment this time, in 28 minutes.
Compared to last year's question bank, the questions in this round focused more on coding correctness than tricky logic.
Programhelp Real-time unmarked assist experience
If you are also preparing for TikTok OA or other big makers written test recently, you can practice similar questions in advance.
Or just get an assist from Programhelp for a guaranteed stress-free take down.
- Real-time voice reminders of stuck ideas (e.g., "the judgment condition is written the other way around" as a key tip)
- Simulated questions help you confirm the logical framework in advance
- Multi-platform environment synchronization (Codesignal / HackerRank / Codility)
- All operations leave no trace, 100% security
We've helped a number of students get OA's from big players like TikTok, Uber, Capital One, Snowflake, and more.
Whether it's fall recruiting, spring recruiting, or the inbound testing phase, it's a solid pass.