π Hi there! The description you are currently reading is just 2nd part of the problem set. It is highly recommended to read ALL THE PARTS before coding as parts may build on top of each other π³
Part 2
For the second set of testcases, the set of non-overlapping intervals can also contain gaps in between known intervals. In these casds, the interval on the lower end of the gap will be extended to fill the gap. This will be sufficient to solve the next 4 test cases.
Examples
01 Β· Example 1
BIN = 424242 N = 2 info = [["0000000000", "3700000000", "VISA"], ["6100000000", "9999999999", "MASTERCARD"]] return = [["4242420000000000", "4242426099999999", "VISA"], ["4242426100000000", "4242429999999999", "MASTERCARD"]]

Example 1: the VISA interval was extended on the higher end to fill the gap, up to the Mastercard interval.
Note - I double checked the input & output numbers while uploading, but since there are so many digits, I might count them wrong. If you notice anything wrong, pls feel free to lmk. I am more than happy to modify accordingly. Many thanks in advance! You da best!!
02 Β· Example 2
BIN = 424242 N = 3 info = [["100000000", "1299999999", "VISA"], ["1900000000", "9999999999", "AMEX"], ["1500000000", "1699999999", "MASTERCARD"]] return = [["4242420000000000", "4242421499999999", "VISA"], ["4242421500000000", "4242421899999999", "MASTERCARD"], ["4242421900000000", "4242429999999999", "AMEX"]]
Example 2: the VISA interval was extended on the higher end to fill the gap up to the Mastercard interval. The Mastercard interval is extended on the higher end to fill the gap up to the Amex interval. The VISA interval is extended on the lwoer end following the requirements in Part 1
Note - I double checked the input & output numbers while uploading, but since there are so many digits, I might count them wrong. If you notice anything wrong, pls feel free to lmk. I am more than happy to modify accordingly. Many thanks in advance! You da best!!
Constraints
π«Ά
More Stripe problems
- Account Balance Manager Part 3 - Platform CoverageONSITE INTERVIEW Β· Seen Jun 2026
- BitFont Part 3 - Decode Run-Length-Encoded RowsONSITE INTERVIEW Β· Seen Jun 2026
- Record Linkage Part 3 - Full Connected ComponentPHONE SCREEN Β· Seen Jun 2026
- Shipping Cost Calculator Part 3 - Mixed Fixed/Incremental TiersONSITE INTERVIEW Β· Seen Jun 2026
- Transaction Fee Calculator - Per-Merchant Volume DiscountPHONE SCREEN Β· Seen Jun 2026
- Account Balance Manager Part 2 - Reject OverdraftsONSITE INTERVIEW Β· Seen Jun 2026
- BitFont Part 2 - Render a WordONSITE INTERVIEW Β· Seen Jun 2026
- Factory Cost - Min-Cost Path Skipping One StagePHONE SCREEN Β· Seen Jun 2026
public String[][] cardRangeObfuscation2(int BIN, int N, String[][] info) {
// write your code here
}
BIN424242
N2
info[["0000000000", "3700000000", "VISA"], ["6100000000", "9999999999", "MASTERCARD"]]
expected[["4242420000000000", "4242426099999999", "VISA", "4242426100000000", "4242429999999999", "MASTERCARD"]]
sign in to submit