FastPrepBitFont Part 2 - Render a Word
Problems/BitFont Part 2 - Render a Word

BitFont Part 2 - Render a Word

Stripe logoStripe● MediumFULLTIMENEW GRADONSITE INTERVIEW

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: July 26, 2026 — 🌺 I re-audited the original author-written sources and rebuilt this practice version from the interview report and follow-up code. It is about a 90% match to the available source. The Stripe onsite BitFont context, character lookup, multi-character rendering, empty-text result, flush row concatenation, first-character output height, zero-padding of shorter glyphs, and 0/1 to./# conversion come directly from the sources. The original Java function signature, runnable lookup-table format, numeric constraints, and complete font data or examples were not shown, so FastPrep filled them in consistently without changing the reported rendering task.

Practice sequence

  1. Part 1: Render a Character
  2. Part 2: Render a Word
  3. Part 3: Decode RLE Rows

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].

Render text by placing its character bitmaps side by side with no columns inserted between them. Build each output row from left to right, then replace every 0 with . and every 1 with #.

Row alignment

If text is empty, return an empty array. Otherwise, the output height is the number of rows in the first character's bitmap.

For each later character, use its row at the current output row when that row exists. If the character has fewer rows, append an all-zero row with that character's width. If it has more rows than the first character, ignore the extra bottom rows.

Function

renderWord(text: String, characters: String, bitmaps: String[][]) → String[]

Examples

Example 1

text = "ABA"characters = "AB"bitmaps = [["010","101","111"],["10","11"]]return = [".#.#..#.","#.####.#","###..###"]

The first A gives the output height of three rows. On the third row, B has no bitmap row, so its two-column width contributes 00. The binary row 11100111 renders as ###..###.

Example 2

text = ""characters = "A"bitmaps = [["1"]]return = []

An empty text returns an empty rendered picture.

Example 3

text = "BA"characters = "AB"bitmaps = [["010","101","111"],["10","11"]]return = ["#..#.","###.#"]

The first character B has two rows, so only two output rows are produced. The third row of A is not used.

Constraints

  • 0 <= text.length() <= 100
  • 1 <= characters.length() == bitmaps.length <= 100
  • Every character in characters is unique, and every character in text appears in characters.
  • Each bitmap contains between 1 and 100 rows.
  • Every row in one bitmap has the same length, between 1 and 100.
  • Every bitmap row contains only 0 and 1.
  • Different characters may use different bitmap heights and widths.

More Stripe Onsite Interview questions

  • Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Render a Task Tree from CSV RowsPHONE 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

  • Hidden ArtifactsIMC Trading · OAIMC Trading interview questions
  • Route Pattern MatcherGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Query Log MatchDatadog · PHONE SCREEN · ONSITE INTERVIEWDatadog interview questions
  • File System Shell CommandsHarvey · ONSITE INTERVIEWHarvey interview questions
  • Feature Flags with Rules, Dependencies and ExposurePerplexity AI · ONSITE INTERVIEWPerplexity AI interview questions
  • Rectangle Point Coverage CountsOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Generate Word Guess FeedbackAtlassian · ONSITE INTERVIEWAtlassian interview questions
  • Stable Unique Column RenamesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Cyclic Fuel Command SimulationWaymo · ONSITE INTERVIEWWaymo interview questions
  • Most Frequent Call Path in Interleaved LogsRoblox · ONSITE INTERVIEWRoblox interview questions

Interview reports that mention this question

  • Stripe New Grad Interview Question Bank: 47 Problems

Stripe interview experiences

  • Stripe New Grad SWE OA and Phone Screen: 2 Experiences
  • Stripe Experienced SWE OA and Onsite Questions: 3 Experiences
  • Stripe SWE Intern Linked Merchants Team Screen: 1 Experience
  • Stripe OA: What It Tests (2026)
  • Stripe SWE Onsite over Two Days: 1 Experience
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public String[] renderWord(String text, String characters, String[][] bitmaps) {
      // write your code here
    }
}
Checking account…