HackTheRounds Interview Experiences

TSMC HackerRank OA Interview Experience (2026) - Group Division, Linked List Extraction, Run-Length, Rejected

TSMC IT Engineer HackerRank OA walkthrough: sort and greedy skill level grouping, pointer surgery linked list extraction, string run length compression edge cas

By Anonymous ยท 2026-04-02

Background

I took the TSMC HackerRank OA for a software-side IT engineer role in February, missed the cut by what I estimate was half a problem, and did not advance. Writing this up partly for closure and partly because I could not find a concrete walkthrough of the current question rotation anywhere online when I was prepping. I have about two years of full-stack experience at a small SaaS company, applied through the company careers portal, and heard back with the OA link exactly 11 days after submitting. No referral.

Timeline

OA Format (90 min, HackerRank)

Three problems, 90 minutes total, any of Python, Java, C++, or C. I used Python because the runtime difference is negligible on HackerRank for the size of these problems and because I wanted fewer footguns in the language itself.

What the rotation is actually testing, based on this attempt and three others I coordinated with people on the same cycle: not algorithmic cleverness. The problems are mostly in the LeetCode-easy to easy-plus bucket. The filter is whether you can produce correct, edge-case-complete code under time pressure. "Looks easy, fails on boundaries" is the genre.

The bar from friends who made it through and from the recruiter's post-reject note is roughly 2.5 out of 3 problems. I cleared 2 and lost the third on edge cases I should have caught.

Problem 1: Group Division by Skill Level

Problem: A university is placing N students into classes based on a skill-level assessment. All students in the same class must have skill levels whose maximum spread is at most MaxSpread . Return the minimum number of classes needed to seat everyone.

Standard sort-and-greedy. Sort the levels ascending. Keep a running "group start" pointer at the first unseated student. Walk forward, and when the next student's level minus the group start exceeds MaxSpread , close the group and start a new one at that student. Linear after the sort, so O(n log n) overall.

The subtle part is deciding whether the problem allows overlapping groups. It does not, which means the greedy is optimal by a standard interval-covering argument. I verified on the provided example [1, 4, 7, 3, 4] with MaxSpread = 2 : sorted it is [1, 3, 4, 4, 7] , groups are {1, 3} , {4, 4} , {7} , total 3. Matched the expected output. Full credit on this one.

Practice it: This question is coming soon to HackTheRounds. Problem 2: Linked List Odd-Positi

This question is coming soon to HackTheRounds. on Extraction

Problem: Given a singly linked list of N nodes, repeatedly extract all currently odd-indexed nodes (1st, 3rd, 5th, ...) in their original order and append them to a new output list. Then rebuild the remaining list from the even-indexed nodes and repeat until the source list is empty. Return the output list. The constraint was explicit: no auxiliary arrays or other extra memory beyond the new nodes.

The clean way to handle this is a two-pointer walk at each pass: one pointer at the current "odd" node and another used to splice the "even" node that follows it. Extract the odd node by detaching its next pointer and appending it to the output list's tail, then advance to the former even position which is now the new odd position of the remaining list. Repeat until the source is empty.

The constraint on extra memory is what makes this trickier than it looks. If you were allowed an array, you would dump values and rebuild. Not allowed here. Pointer surgery only.

I passed this one too, mostly because I had drilled pointer-splicing patterns the week before.

Practice it: This question is coming soon to HackTheRounds. Problem 3: String Run-Length Comp

This question is coming soon to HackTheRounds. ression

Problem: Given an input string, produce a compressed form where each run of consecutive identical characters becomes that character followed by the run length. For example, "aabbaa" becomes "a2b2a2" . Single characters appear without a count.

This is the one I lost. Conceptually it is a trivial single-pass counter: walk the string, maintain a run character and a run length, flush to the output when the character changes. The trap is the single-character edge case. The spec said "if a character occurs only once, it is added to the compressed string," which I read as "append the character alone, no count." I implemented that reading.

Two hidden tests failed. Looking at the fail list afterwards, I believe the tests disagreed with my reading of "only once." Specifically, I think they expected "a1" in some cases and "a" in others depending on surrounding context, or the spec intended "only appears once in the entire string, not one-time in a run." I never got the exact semantics confirmed. Half credit on this one.

Practice it: This question is coming soon to HackTheRounds. What Actually Failed Me

Not the

This question is coming soon to HackTheRounds. algorithm. I had the right approach on all three problems, I had working code on all three, I had sanity-checked outputs on the given examples. What killed me was an ambiguous problem statement on Problem 3 and a twenty-minute runway at the end that I did not use to re-read the prompt more carefully. If I had spent those twenty minutes testing my interpretation of the "only once" clause against a variety of inputs (single-character string, all-same-character string, alternating pattern), I probably would have caught the ambiguity and coded a branch for both readings.

This question is coming soon to HackTheRounds.

Result

Auto-rejection email six days later. The recruiter's note said, roughly, "your submission did not meet the minimum threshold for hidden tests." No ability to retake within the same cycle. I was told I could reapply after a six-month cooldown.

Tips

  1. The TSMC OA rewards edge-case completeness, not algorithmic cleverness. Every problem in the rotation has a straightforward base algorithm. The filter is whether your code handles empty input, single-element input, maximum-range input, and any ambiguity in the problem statement. Budget at least 15 minutes per problem for edge-case testing before you hit submit.
  2. Re-read ambiguous clauses twice before committing to an interpretation. The "single character occurrence" clause on Problem 3 killed me. If a sentence in the spec can be read two ways, code both branches and test both. HackerRank lets you run custom input before final submission for a reason.
  3. Drill pointer-surgery linked-list patterns until you can write them without a dry run. The odd-position extraction problem is a TSMC staple in 2026. Similar variants ask for k-group reversal and split-at-midpoint. Being able to produce working code from a clean head without a whiteboard is the prep target.
  4. Sort-and-greedy is the default for partition-style problems. Problem 1 is the current rotation's go-to for the sort-and-greedy archetype. Spend 10 minutes reviewing the canonical form (sort ascending, walk with a running window) and the tie-break rules.
  5. Language choice matters less than you think. Python is fine on HackerRank for TSMC-sized problems. Java and C++ are marginally faster in raw runtime but introduce overflow bugs and verbose syntax that costs more than it saves. Pick whichever language gets you to a clean implementation fastest.
  6. If you get rejected, write the postmortem that night. I am writing this one 48 hours after the reject email and my memory of Problem 3's exact wording has already started to blur. If you want to reuse the experience for a future cycle, log it within a day.

The OA is not the filter people online make it out to be. It is an honest "can you write correct boundary-complete code under time" test. If that description does not describe you today, spend three weeks drilling that specifically rather than grinding LeetCode volume. That is the piece I wish I had done differently.

This question is coming soon to HackTheRounds.