This article is not a simple compilation of questions, but is based on the actual question structure, question logic, and key points that are most likely to be brushed off when we actually assisted many students in ProgramHelp to participate in TSMC OA.
If you are preparing TSMC For Software / IT / System / Data related positions, this round of HackerRank OA is basically the first hurdle that cannot be avoided.
The true positioning of TSMC OA: not the number of questions, but the stability of screening
Judging from the many OAs we have come into contact with, TSMC’s HackerRank test has a very obvious feature:
It does not pursue difficult algorithms, but attaches great importance to:
- Is the logic complete?
- Are boundary conditions properly handled?
- Can we stably output runnable code within a limited time?
This is why many students have an illusion:
"The question didn't look difficult, but I just couldn't pass it."
The problem is often not in the algorithm, but in the details.
TSMC HackerRank OA Basic Form (Latest Batch Summary)
Taking the Software/IT Engineer direction as an example, the OA structure in the past year is highly consistent:
- Platform: HackerRank
- Duration: approximately 90 minutes
- Number of questions: 3 questions
- Difficulty distribution:
- 1 Basic implementation of partial questions
- 1 Question: Moderate Logic
- 1 question examines data structure or boundary processing
Language support: Python/Java/C++/C and other mainstream languages
Whether to allow local IDEs: No, needs to be fully adapted to the HackerRank environment
Judging from the result feedback, only after passing at least 2 questions stably can you enter the subsequent screening.
Directions for OA questions that have actually appeared (not involving reproduction of the original questions)
The following are multiple question types that have appeared repeatedly during our assistance process. They have been structurally abstracted and do not involve the leakage of the original questions.
1. Group Division
A university has admitted a group of N Students with varying skill levels. To better accommodate the students, the university has decided to create classes tailored to these skill levels. A placement examination returns a skill level for each student, represented by an array Levels[], where Levels[i] Denotes the skill level of students I.
All students within a group must have skill levels that are within a specified range, MaxSpread, of one another. The goal is to determine the minimum number of groups that must be formed to ensure that no group contains students whose skill levels differ by more than MaxSpread.
Example
Input:
N=5(number of students)Levels = [1, 4, 7, 3, 4](skill levels of the students)MaxSpread=2(the maximum allowed skill level difference within a group)
Output:
3(minimum number of groups)
In this example, one optimal grouping is:
- Group 1: (1, 3)
- Group 2: (4, 4)
- Group 3: (7)
An alternative valid grouping could be:
- Group 1: (1)
- Group 2: (3, 4, 4)
- Group 3: (7)
In both cases, we form 3 groups, and this is the minimum number of groups that can be formed. There’s no way to form fewer than 3 groups given the MaxSpread Condition.
Problem-solving ideas
Sort skill levels: First sort students’ skill levels from small to large. This ensures that when we iterate through students, we only need to pay attention to the skill differences of adjacent students.
Greedy strategy grouping: Traverse the sorted list of students and try to put each student into the current group until the maximum skill difference within the current group exceeds maxSpread. If exceeded, start a new set.
2. Linked List Creation
There is a singly linked list of N Nodes. Each node is an instance of a SinglyLinkedListNodethat has an integer value Data And a pointer to the next node, Next. Perform the following operations to generate a new linked list:
- Select all the nodes at odd positions.
- Append these nodes to the new linked list, keeping them in their original order.
- Delete these nodes from the old linked list.
- Repeat from step 1 until there are no nodes left in the old linked list.
Return a reference to the head of the final linked list.
Note: Extra memory, other than creating some new nodes, should not be used for the implementation.
Problem-solving ideas
Define the linked list node structure: Each linked list node contains data (node value) and next (pointer to the next node).
Select nodes at odd positions: We can get nodes at odd positions by traversing the linked list. Nodes at odd positions refer to nodes at positions 1, 3, 5, etc.
Modify pointer connection:
Get the nodes at odd positions from the original linked list and add them one by one to the end of the new linked list.
When deleting these nodes, you must ensure that the predecessor node of the original linked list points correctly to the next node to avoid breaking the link.
Repeated operation: Each time after processing the nodes at odd positions, you need to skip a node (that is, delete the next node of the currently processed node), and continue to perform this operation until the linked list is empty.
3. String compression and decompression
Various compression methods are employed to minimize the size of messages transmitted over the internet. A specific algorithm compresses a given string by indicating the total number of consecutive occurrences of each character. For instance, one string "aabbaa" Can be compressed as "a2b2a2". The characters of each character are grouped as follows:
AOccurs two times consecutively,BOccurs two times consecutively,AOccurs two times consecutively.
If a character occurs only once, it is added to the compressed string. If it occurs consecutively, the character is added to the string followed by an integer representing the number of consecutive occurrences. As a result, the compressed form of the string is "a2b2a2".
Function Description:
Complete the function CompressedString In the editor below. The function must return the compressed form of the message.
CompressedString Has the following parameter(s): Message: a string.
Returns: String: the compressed message.
Def compressedString(s):
# Write your code here
n = len(s)
ans = ""
i = 0
while i < n:
j=i+1
while j 1:
ans += str(j - i)
i = j
return ans
The idea of solving the problem is to traverse the string, count the number of consecutive occurrences of each character, and combine the characters and the number to generate a compressed string.
Learn More
Tsmc one acre and three quarters
TSMC Recruitment
TSMC Interview Lazy Person's Kit: Interview Process, Interview Questions TSMC IT Careers

Sprint TSMC but get stuck by HackerRank OA, don’t panic!
Our professional team focuses on assisting the entire TSMC recruitment process, and has helped hundreds of candidates stably pass the first level of HackerRank, and even go straight to on-site/video interviews.
Service content:
- AccurateHackerRank OA agent(3 questions in 90 minutes, stable pass, code style perfectly matches personal level)
- Real-time synchronization assistance (screen sharing + voice guidance, zero risk)
- Follow-up technical interview 1v1 simulation + question bank targeted training
- Behavioral interview/HR interview answer customization + interview service (needs evaluation)
The entire process is confidential, professional and low-key, with a success rate of over 95%.
Act now to lock in your TSMC offer!