Problem · String
BitFont Part 1 - Render a Character
Learn this problemProblem statement
Practice 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 reported 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 problems
- Group Linked Merchant RecordsPHONE SCREEN · Seen Jul 2026
- Invoice / Payment ReconciliationPHONE SCREEN · Seen Jul 2026
- Incident MonitorOA · Seen Jul 2026
- Merchant Fraud Risk ScoringOA · Seen Jul 2026
- WebSocket Load Balancer — Basic Load Balancing (Part 1)OA · Seen Jul 2026
- Rule-Driven Transaction Fraud DetectionOA · PHONE SCREEN · Seen Jul 2026
- Deployment Window SchedulerOA · Seen Jul 2026
- Directly Linked UsersOA · Seen Jun 2026