Select Compatible Card Applications
Updated
Problem statement
A payment card advertises application identifiers in preference order, and a terminal supports its own set of application identifiers.
Return the identifiers advertised by the card that the terminal also supports. Preserve the card's original order. Matching is exact and case-sensitive.
Function
selectCompatibleApplications(cardApplications: String[], terminalApplications: String[]) → String[]Examples
Example 1
cardApplications = ["A0000000031010","A0000000041010","A00000002501"]terminalApplications = ["A0000000041010","A0000000031010"]return = ["A0000000031010","A0000000041010"]Both Visa and Mastercard identifiers are supported, and the card's preference order is retained.
Example 2
cardApplications = ["app.pay","app.rewards","app.credit"]terminalApplications = ["app.credit","app.pay"]return = ["app.pay","app.credit"]app.rewards is not supported. The remaining identifiers follow card order, not terminal order.
Example 3
cardApplications = ["A","B"]terminalApplications = ["a","C"]return = []Matching is case-sensitive, so A does not match a.
Constraints
0 <= cardApplications.length, terminalApplications.length <= 100000.- Each array contains unique non-empty identifiers.
- Every identifier has length at most
200. - Matching is exact and case-sensitive.
More Stripe Phone Screen questions
- Business Account KYC Verification — Parts 1–5PHONE SCREEN · Seen Nov 2026
- Financial Account LedgerOA · PHONE SCREEN · Seen Nov 2026
- Merchant Matching, Parts 1–2: Shared Fields and Weighted ThresholdsPHONE SCREEN · Seen Nov 2026
- Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Merchant Payout Scheduler, Part 2: Per-Merchant SchedulesPHONE SCREEN · Seen Nov 2026
- Transaction Fee Calculator — Parts 1–2: Basic Fee Calculation and Conditional Fee RulesPHONE SCREEN · Seen Nov 2026
- Render a Task Tree from CSV RowsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Linked Merchants Within Two HopsPHONE SCREEN · Seen Nov 2026
- Portfolio Valuation, Part 1PHONE SCREEN · Seen Nov 2026
Similar questions at other companies
- Detect a Straight FlushTemu · PHONE SCREENTemu interview questions
- Shared Courses for Every Pair of StudentsCrunchyroll · PHONE SCREENCrunchyroll interview questions
- Single-Condition Product FilterCrowdstrike · PHONE SCREENCrowdstrike interview questions
- Convert an Entry List to a MapEPAM · PHONE SCREENEPAM interview questions
- Most Frequent NameAmazon · PHONE SCREEN
- Words with Repeated AnagramsThe Voleon Group · PHONE SCREEN
- Project JSON Fields into a Target FormatBooking.com · PHONE SCREEN
- Product Keyword SearchTesco · PHONE SCREEN
- Verify Words Sorted by a Custom AlphabetTrueFoundry · PHONE SCREEN
- Character Frequencies Across Nested String ListsSnowflake · PHONE SCREENSnowflake interview questions