Company: Stripe_1nov
Difficulty: medium
Card Range Obfuscation Problem Description Payment card numbers are composed of eight to nineteen digits, the leading six of which are referred to as the bank identification number (BIN). Stripe's card metadata API exposes information about different card brands within each BIN range, by returning a mapping of card intervals to brands. However, a given BIN range may have gaps at the beginning, middle, or end of the range where no valid cards are present. This information can be used by fraudsters to test for valid credit cards with a high degree of probability. To prevent fraudsters from abusing the data gaps, we must fill in missing values by extending the returned intervals to cover the entire range. A BIN range refers to all the 16-digit card numbers starting with a given BIN; for example, a BIN of 424242 has a range of 4242420000000000 to 4242429999999999, inclusive. An interval is a subset of a BIN range, also inclusive. In this problem, we'll be taking as input a 6-digit BIN and