Problem Statement:You are provided with three tables,customers,accounts, andtransactions, containing information about bank customers, their accounts, and transaction activity. Your task is to identify the customers who were active.
A customer is considered active if:
Return:customer_id,full_name,city,total_accounts,total_transactions_2024,total_deposits_2024in descending order oftotal_deposits_2024.
Table Description:Table:customers
Problem Statement:You are given a vector of N strings and Q queries. Each query contains a string, and you need to determine how many anagrams of that query string exist in the original vector. Two strings are anagrams if they contain the same characters with the same frequencies, regardless of order. You must preprocess the vector efficiently to handle multiple queries quickly using hashmaps and collections.
Your task is to build a frequency map of the strings that are anagrams of each other are grouped together, then answer each query by returning the count of strings in the vector that are anagrams of the query string.
Function Description:You need to implement the functioncountAnagramGroups. The function should preprocess the vector of strings by grouping the anagrams using a hashmap, then for each query string return the count of its anagrams in the original vector.
Function Parameters: