FastPrepTeam A High-Severity Transfer Hashes

Team A High-Severity Transfer Hashes

Chainalysis logoChainalysis● EasyFULLTIMEONSITE INTERVIEW
Learn

Problem statement

Four parallel arrays describe each log's team, search type, severity, and transaction hash.

Return the transaction hash of every log whose team is exactly Team A, search type is exactly transfer, and severity is exactly high. Preserve stream order and duplicate hashes.

Function

teamAHighSeverityTransferHashes(teams: String[], searchTypes: String[], severities: String[], transactionHashes: String[]) → String[]

Examples

Example 1

teams = ["Team A","Team A","Team B"]searchTypes = ["transfer","address","transfer"]severities = ["high","high","high"]transactionHashes = ["0xaa","0xbb","0xcc"]return = ["0xaa"]

Only the first log satisfies all three predicates.

Example 2

teams = ["Team A","Team A"]searchTypes = ["transfer","transfer"]severities = ["high","high"]transactionHashes = ["0x1","0x1"]return = ["0x1","0x1"]

Distinct qualifying logs retain duplicate hashes.

Constraints

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

More Chainalysis problems

See Chainalysis hiring insights
public String[] teamAHighSeverityTransferHashes(String[] teams, String[] searchTypes, String[] severities, String[] transactionHashes) {
    // write your code here
}
teams["Team A","Team A","Team B"]
searchTypes["transfer","address","transfer"]
severities["high","high","high"]
transactionHashes["0xaa","0xbb","0xcc"]
expected["0xaa"]
Checking account…