FastPrepHigh-Severity Counts by Search Type
Problems/High-Severity Counts by Search Type

High-Severity Counts by Search Type

Chainalysis logoChainalysis● EasyFULLTIMEONSITE INTERVIEW

Updated Sep 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: A first-hand Chainalysis onsite report asks for the number of high-severity logs for every search type. Exact severity matching and sorted searchType=count output, including zeroes, are explicit execution assumptions; the reported core matches at about 91%.

Parallel arrays describe stream logs: searchTypes[i] is the search type and severities[i] is the severity.

For every distinct search type, count logs whose severity is exactly high. Return strings formatted as searchType=count, sorted lexicographically by search type. Include a distinct type even when its count is zero.

Function

highSeverityCountsBySearchType(searchTypes: String[], severities: String[]) → String[]

Examples

Example 1

searchTypes = ["transfer","address","transfer"]severities = ["high","low","high"]return = ["address=0","transfer=2"]

Both types appear, and only exact high severities count.

Example 2

searchTypes = ["tx","tx"]severities = ["HIGH","low"]return = ["tx=0"]

Severity matching is exact and case-sensitive.

Constraints

  • The arrays have the same length from 0 through 100000.
  • Every search type and severity is a non-empty ASCII string.
  • Search types do not contain =.

More Chainalysis interview questions

  • Block Transaction Count TrendsONSITE INTERVIEW · Seen Mar 2025
  • Filter Team A LogsONSITE INTERVIEW · Seen Mar 2025
  • Filter Team A Transfer LogsONSITE INTERVIEW · Seen Mar 2025
  • Team A High-Severity Transfer HashesONSITE INTERVIEW · Seen Mar 2025
  • Meeting RoomsPHONE SCREEN · Seen Apr 2025
  • Meeting Rooms IIPHONE SCREEN · Seen Apr 2025
  • Course Schedule IIOA · Seen Nov 2022
  • Longest Common SuffixOA · Seen Nov 2022

Similar questions at other companies

  • Map and Accumulate Learning QueriesPalantir · ONSITE INTERVIEWPalantir interview questions
  • Filter Anagrams of a TargetMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Rank Transform an ArrayAgoda · ONSITE INTERVIEWAgoda interview questions
  • Deduplicate Logs: Keep FirstGoogle · ONSITE INTERVIEWGoogle interview questions
  • Loyal Customers by Two-Day Product VarietyAmazon · ONSITE INTERVIEW
  • Restaurant Vote LeadersZipRecruiter · PHONE SCREEN · ONSITE INTERVIEWZipRecruiter interview questions
  • Intersection of Two ListsJP Morgan Chase · ONSITE INTERVIEWJP Morgan Chase interview questions
  • Pair Left and Right Socks by IDRoblox · ONSITE INTERVIEWRoblox interview questions
  • Net Position Calculation from API SnapshotsHeadlands Technologies · ONSITE INTERVIEWHeadlands Technologies interview questions
  • Count Word FrequenciesBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
All Chainalysis interview questionsSee Chainalysis hiring insights
Saved
class Solution {
    public String[] highSeverityCountsBySearchType(String[] searchTypes, String[] severities) {
        // write your code here
    }
}
Checking account…