Reported March 2025
Chainalysisarray

Filter Team A Transfer Logs

Reported by candidates from Chainalysis's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Chainalysis OA. Under 2s to a working solution.
Founder's read

The mistake that sinks a first attempt at this Chainalysis question is treating it as harder than it is, then fumbling the string match. It was reported in March 2025. Two parallel arrays, teams and searchTypes, and you return the indices where the team is exactly Team A and the search type is exactly transfer. That's a single-pass array scan with two string checks. The trap is case. Example 2 shows Transfer with a capital T must not match. If you blank on the details live, StealthCoder runs invisibly during the assessment as a safety net, but this one is simple enough that you probably won't need it.

The problem

Parallel arrays describe a stream of logs: teams[i] is the team and searchTypes[i] is the search type of log i.
Return the zero-based indices whose team is exactly Team A and whose search type is exactly transfer, preserving stream order.

Function
filterTeamATransferLogs(teams: String[], searchTypes: String[]) → int[]

Examples
Example 1
teams = ["Team A","Team B","Team A"]
searchTypes = ["transfer","transfer","address"]
return = [0]
Only the first log satisfies both predicates.
Example 2
teams = ["Team A","Team A"]
searchTypes = ["Transfer","transfer"]
return = [1]
Search-type matching is exact.

Constraints
The arrays have the same length from 0 through 100000.
Every value is a non-empty ASCII string.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The pattern is one linear pass over the arrays. Loop i from 0 to length minus 1, check teams[i] equals "Team A" and searchTypes[i] equals "transfer", and push i into the result. Order is preserved for free because you walk the stream in order. The pitfall is sloppy matching. Don't lowercase anything, don't trim, don't use contains or startsWith. The statement says exact, and Example 2 tests it. Use strict equality, and in Java use.equals, never ==. Also handle length 0 by returning an empty array. At 100000 entries, O(n) time and O(k) output space is plenty. Return indices, not the matching strings. If the live OA freezes you on signature details or the return type, StealthCoder is the hedge that reads the prompt and hands you working code. Otherwise, write it in five minutes and move on.

If this hits your live OA and you blank, StealthCoder solves it in seconds, invisible to the proctor.

If this hits your live OA

You can drill Filter Team A Transfer Logs cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Chainalysis's OA.

Chainalysis reuses patterns across OAs. Built by an Amazon engineer who would have shipped this the night before his JPMorgan OA if he'd had it. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Filter Team A Transfer Logs FAQ

How hard is the Chainalysis Filter Team A Transfer Logs question really?+

Easy. It's a single loop with two equality checks. The difficulty is reading carefully, not algorithms. Candidates lose points on case sensitivity and returning the wrong thing, like strings instead of indices. If you handle those, you're done quickly.

What's the trick to this problem?+

There isn't a clever one. Walk both arrays together by index, compare each value to the exact literals "Team A" and "transfer", and collect the index when both match. The only real trick is refusing to normalize case or whitespace.

Does the search type match need to be case-insensitive?+

No. Example 2 shows Transfer with a capital T is rejected and only index 1 with lowercase transfer is returned. Use exact string equality and nothing fuzzy like lowercasing, trimming, or substring checks.

What edge cases should I test before submitting?+

Test empty arrays, which should return an empty result. Test no matches, all matches, and a case mismatch like Transfer versus transfer. Also check that Team A must match fully, so something like Team AB or team a shouldn't count.

How should I prepare for this in 48 hours?+

Don't over-prep this one. Practice basic array filtering returning indices in your language, and know its exact string equality operator. Then spend the time on harder OA patterns like sliding window, hash maps, and prefix sums, since other questions in the set may be tougher.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Chainalysis.

OA at Chainalysis?
Invisible during screen share
Get it