Company: jpmc_12aug
Difficulty: medium
Count Signals Problem Description Signal filtering based on frequency is essential to minimize noise outside the desired frequency range. Filters can be combined such that only frequencies within the permissible range of all filters can pass through. For instance, three filters with frequency ranges (10, 17), (13, 15), and (13, 17) will only allow frequencies between 13 and 15 to pass through, as this is the only overlapping range. Given n signal frequencies and a sequence of m filters with specified frequency ranges from x to y (inclusive), determine how many signals will pass through all the filters. There will be a single common range where all filters overlap. Examples Example 1: Input: frequencies = [8, 15, 14, 16, 21] filtersRanges = [[10, 17], [13, 15], [13, 17]] Output: 2 Explanation: The range that all of the filters allow through is from 13 to 15, inclusive. The 2 frequencies that will pass through all filters have frequencies of 15 and 14. Return 2. Function Description Comp