BitFont Part 1 - Render a Character
Updated
Problem statement
Sequence
A bitmap font stores one bitmap for each supported character. The lookup table is represented by two parallel inputs: characters[i] names the character whose bitmap is stored in bitmaps[i].
Each bitmap is a list of equal-length binary strings. A 0 is an empty pixel and a 1 is a filled pixel.
Given the lookup table and a target character, find the target's bitmap and render it by replacing every 0 with . and every 1 with #. Return the rendered rows in their original order.
Function
renderCharacter(characters: String, bitmaps: String[][], target: char) → String[]Examples
Example 1
characters = "J"bitmaps = [["000010","000010","000010","000010","000010","000010","100010","011100","000000","000000"]]target = "J"return = ["....#.","....#.","....#.","....#.","....#.","....#.","#...#.",".###..","......","......"]The J bitmap is selected from the lookup table. Each 0 becomes a period and each 1 becomes a hash while the row order and dimensions stay unchanged.
Example 2
characters = "AB"bitmaps = [["010","101","111","101"],["110","101","110","101","110"]]target = "B"return = ["##.","#.#","##.","#.#","##."]B is the second character, so the second bitmap is selected and rendered. The first bitmap is not part of the output.
Constraints
1 <= characters.length() == bitmaps.length <= 100- Every character in
charactersis unique, andtargetappears exactly once. - Each bitmap contains between
1and100rows. - Every row in one bitmap has the same length, between
1and100. - Every bitmap row contains only
0and1. - Different characters may use different bitmap dimensions.
More Stripe Onsite Interview questions
- Render a Task Tree from CSV RowsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Transaction Rule Expression EvaluatorONSITE INTERVIEW · Seen Oct 2026
- Evaluate Ordered Action RulesPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
- WebSocket Load Balancer — Parts 1–5OA · ONSITE INTERVIEW · Seen Sep 2026
- Rule-Driven Transaction Fraud DetectionPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
- Account Balance Manager Part 3 - Platform CoverageONSITE INTERVIEW · Seen May 2026
- Account Balance Manager Part 2 - Reject OverdraftsONSITE INTERVIEW · Seen May 2026
- Account Balance Manager Part 1 - Calculate TotalsONSITE INTERVIEW · Seen May 2026
Similar questions at other companies
- Cyclic Fuel Command SimulationWaymo · ONSITE INTERVIEWWaymo interview questions
- Simulate a Deterministic Finite AutomatonPoint72 · OAPoint72 interview questions
- Excel Training Data and Model Response AuditMicrosoft · PHONE SCREENMicrosoft interview questions
- Collect Letters Along a Unique Grid PathApple · OAApple interview questions
- Repair One Movement InstructionOpenAI · OAOpenAI interview questions
- Count Straight-Line Word Occurrences in a GridOptiver · OAOptiver interview questions
- Count Straight-Line Word Occurrences in a GridVisa · OAVisa interview questions
- Flip Rows and Columns, Count ZerosNutanix · OANutanix interview questions
- Hidden ArtifactsIMC Trading · OAIMC Trading interview questions
- Bounded Word Guess SolverAtlassian · ONSITE INTERVIEWAtlassian interview questions