Filter Team A Transfer Logs
Problem statement
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
0through100000. - Every value is a non-empty ASCII string.