InterviewLegend

Browser History, Credit Cards & Org Charts

Alex Chen40 min readGuide updated
In this lesson
  • Build browser history with clamped back and forward, then extend it to several tabs
  • Compare array plus index, two stacks and a linked list for the history
  • Process Add, Charge and Credit commands with a 12 to 16 digit check and Luhn
  • Print an org chart from employee records that name each manager, with several people at the top

Chime's coding round tends to hand you a small piece of software instead of a puzzle. You write a class or a command loop that keeps some state, answers queries about it, and runs against a set of tests. Then the interviewer adds a rule. The three problems that carry most of the named reports all have that shape: a browser history class, a two-player board game and a credit card processor.

This lesson covers the browser history class and its tabs follow-up first, since those are the most recent. Then come two older ones that are still good practice, the credit card processor and an org chart printer. The board games have their own lesson. One practice drill closes it out.

The Chime angle
Green tests are the floor at Chime. Two senior candidates passed every test on a non-LeetCode screen and were still rejected, one in 2021 and one in 2023. Feedback in other reports mentions readability and showing your thought process. Name your state clearly and keep each method short.

How the stateful problems run

The rounds run for about an hour in the language you pick. CodeSignal is the tool named in reports since 2024, and CoderPad shows up in 2020 ones. The credit card statement even carries a CodeSignal-style time limit header, and it's graded by unit tests. Expect the base version first and the follow-up after it. With browser history, that follow-up has been a visited check, then several tabs, then several users.

So pick the state before you type. Ask what each query needs to read, and store exactly that. A history needs the pages and a cursor. A card ledger needs a dict from holder to balance and limit. An org chart needs a dict from manager to reports. When the next part lands, it should cost one new field or one new branch.

Every problem here is a dict or a list plus a few rules. The rules are where the points go. Forward history disappears on a visit, a charge over the limit is declined, and a record with no manager starts a new tree. Say each rule out loud before you code it, and write a test for it.

Browser history, the most-reported problem

This is the most recent repeat in Chime's coding rounds, with about ten reports from March 2024 to March 2026. The newest is a San Francisco backend phone screen in March 2026. A backend SDE2 candidate got it in a September 2025 online round, with bonus features on top, and it was linked to two onsites in October and November 2025. The oldest is a March 2024 intern technical interview in San Francisco.

Candidates say the base is LeetCode 1472 unchanged. You build visit, back and forward for a single tab, and a visit wipes out any pages you could have reached with forward. That rule is the one the 2024 intern was asked about directly. Chime may not stop there, so build it in a way that takes the next part cleanly.

1

Browser History With Back and Forward

MediumSignature problem
Problem
Build a BrowserHistory class for one browser tab. The constructor takes homepage, the first page on screen.

visit(url) opens url from the current page. Any pages you could have reached with forward are gone after a visit.

back(steps) moves back up to steps pages and returns the page you land on. forward(steps) does the same toward newer pages. Neither one moves past the oldest or newest page, so a big step count stops at the end.
  1. BrowserHistory("chime.com")
  2. visit("chime.com/spotme")
  3. visit("chime.com/savings")
  4. back(1)→ "chime.com/spotme"
  5. back(5)→ "chime.com"
  6. forward(1)→ "chime.com/spotme"

back(5) only has two pages to go, so it stops at the homepage. forward(1) then moves one page newer.

How this uses the pattern

Keep a list of pages, an index for the page on screen and an index for the last page forward may reach. A visit moves the cursor one step and resets that last index to it. back and forward clamp the cursor between 0 and the last index.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Browser History With Back and Forward

Loading...
Click "Run" to execute your code
The Chime angle
Candidates confirm the base matches LeetCode 1472, so the base alone won't set you apart. What does is how you talk about the structure. A July 2025 phone screen was described as a discussion of data structures and trade-offs, and the usual options are a list plus an index, two stacks or a doubly linked list. Pick the list, say why, and be ready for the visited check and tabs that tend to come next.
Take it further
Has the user visited this page? The next part reported for this problem is a haveVisited(url) query. Ask whether a page wiped out of forward history still counts. It usually should, since the user saw it, and then a set of every URL ever loaded answers the query in O(1). The worked version is below the solution.

The tabs follow-up

In 2025 the follow-up grew to several tabs. A July 2025 phone screen covered back, forward and multiple tabs, with a discussion of data structures and trade-offs, and that candidate passed. An August 2025 video phone screen added tabs as a follow-up to the base class. A backend engineer technical screen listed in February 2026 is titled design browser history across tabs.

The reports name the feature without its exact methods. The class below uses one sensible API, with open, close and switch for tabs and the visited check from the last follow-up. Read the method names as a choice you'd agree on in the room.

2

Browser History Across Tabs

MediumSignature problem
Problem
Build a TabbedBrowser. The constructor takes homepage and opens tab 1 on it. Each tab has its own history with the same rules as a single tab: visit(url), back(steps) and forward(steps) act on the active tab, a visit drops that tab's forward pages, and steps clamp at both ends.

openTab(url) opens a new tab on url with the next id (2, 3, and so on), makes it active and returns its id. Ids are never reused. switchTab(tabId) makes that tab active and returns the page it shows. An unknown id changes nothing and returns the active tab's page.

closeTab(tabId) closes a tab and returns the active tab's id afterwards. If the closed tab was active, the tab to its left in opening order becomes active, or the new first tab if it had none on its left. Closing an unknown tab or the last open tab changes nothing.

haveVisited(url) returns true if any tab ever showed url, including closed tabs and wiped forward pages.
  1. TabbedBrowser("chime.com")
  2. visit("chime.com/spotme")
  3. openTab("bank.com")→ 2
  4. visit("bank.com/login")
  5. back(1)→ "bank.com"
  6. switchTab(1)→ "chime.com/spotme"
  7. back(1)→ "chime.com"

Tab 2 has its own history, so back(1) there returns bank.com. Switching to tab 1 finds it still on chime.com/spotme.

How this uses the pattern

Keep a dict from tab id to that tab's history, a list of open ids in opening order for picking the next active tab, and one set of visited urls shared by every tab.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Browser History Across Tabs

Loading...
Click "Run" to execute your code
The Chime angle
The tabs part tests whether your single-tab code was built to be reused. If the history lives in its own small object, tabs are a dict of those objects plus an active id, and the old methods route through it. The decisions that need a sentence each are which tab becomes active after a close and whether a closed tab's pages still count as visited. Pick, say it out loud, and test it.
Take it further
Then several users. The next step after tabs is several users. Each user gets their own tabs, active tab and visited set, so the top level becomes a dict from user id to a TabbedBrowser, and every call takes a user id first. If the interviewer asks whether one user's visits can show up for another, the answer is no unless the spec says so.

Older problems (2019-2025)

Neither of the next two has shown up in a dated report since early 2025, but both have the same shape as browser history. Chime used the credit card processor for longer than any other problem. Org chart reports are rarer and older, and it's a quick rep in parsing records into a tree.

The credit card command processor

This one ran from July 2021 to January 2025, across fourteen reports, five of them firsthand. Most were phone screens, and one was a July 2024 online assessment. The newest dated report, from January 2025, is a phone screen on command validation and balance management. It still sits on 2026 question lists, so it's worth an hour.

The prompt goes something like this: you're writing software for a credit card provider that adds accounts, processes charges and credits, and prints a summary. A 2021 candidate called it easy to easy-medium. A 2022 candidate said it came down to clarifying the conditions and keeping up the communication.

3

Credit Card Command Processor

EasyCommonly asked
Problem
Write process_commands(commands) for a credit card provider. Each command is a string. Add $ opens an account with balance $0. Charge $ raises the balance and Credit $ lowers it. Amounts are whole dollars.

A card is valid when it has 12 to 16 digits, all of them numbers, and passes the Luhn check. For Luhn, start at the rightmost digit and double every second digit. Subtract 9 from any doubled value over 9, then add up all the digits. The number passes when the sum is a multiple of 10.

A charge that would take the balance over the limit is declined and changes nothing. A credit always goes through, so a balance can go negative. Commands for an invalid card, a name that was never added, or a second Add for the same name are ignored.

Return one line per account, sorted by name: Name: $balance, or Name: error when the card is invalid.
Inputcommands = ["Add Tom 4111111111111111 $1000", "Add Lisa 5454545454545454 $3000", "Add Quincy 123456789 $2000", "Charge Tom $500", "Charge Tom $800", "Charge Lisa $7", "Credit Lisa $100", "Credit Quincy $200"]Output["Lisa: $-93", "Quincy: error", "Tom: $500"]

Tom's second charge would reach $1300, over his $1000 limit, so it is declined. Lisa's credit takes her to -$93. Quincy's card has 9 digits, so his account is an error and his credit is ignored.

How this uses the pattern

Parse each command by splitting on spaces. Keep a dict from name to [balance, limit, valid]. Validate the card once, when the account is added, and skip any later command whose account is missing or invalid.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Credit Card Command Processor

Loading...
Click "Run" to execute your code
The Chime angle
Chime's version is graded by unit tests, and the Luhn check is the bonus that usually only the last test checks. Get the 12 to 16 digit rule working and every other test green first, then add Luhn as one helper. A 2024 phone screen on this problem was described as a question about hashmap usage and optimization, so expect to explain why a dict keyed by name makes every command O(1).
Take it further
Same ledger, new command names. One version of this problem names the commands new, credit and debit instead. The structure doesn't change, so move the command words into one place in your parser and the rename is a one-line edit. If the interviewer asks about cents, store amounts as integer cents and format on output, since floats drift on money.

Print an org chart

Three reports cover this one. An October 2019 phone screen gave a string of employee records and asked for the tree. That candidate misread the output format and didn't finish. A May 2020 backend phone screen on CoderPad used records like 1:max:4, 2:ann:0, printed one dash per level, and added a follow-up for several people with no manager. A 2024 onsite included an org chart coding problem.

The 2020 candidate solved it with a topological sort and was rejected. Whether the sort cost them the offer is unknown, but a map from manager to reports plus a depth-first walk is shorter, and it prints people in the right order without any sorting.

4

Print an Org Chart

MediumSometimes asked
Problem
You get one string of employee records separated by commas. Each record is id:name:manager_id, and a manager id of 0 means the person reports to nobody.

Return the chart as a list of lines, one per person. Each person comes right after their manager, with one dash per level below the top. A manager's reports are listed in the order they appear in the input.

There can be more than one person at the top. Anyone whose manager id is 0, or names nobody in the records, starts a separate tree, and the trees print in input order. An empty string gives an empty list.
Inputrecords = "1:max:4, 2:ann:0, 3:joe:2, 4:kim:2"Output["ann", "-joe", "-kim", "--max"]

ann has no manager, so she is the top. joe and kim report to her, and max reports to kim.

How this uses the pattern

Split the records, build a dict from manager id to that manager's reports in input order, and collect the people at the top. Then walk each top person depth first, printing the name with depth dashes before visiting the reports.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Print an Org Chart

Loading...
Click "Run" to execute your code
The Chime angle
Most of the risk sits in the output format. The 2019 candidate misread it and didn't finish, so repeat the expected output back on one small example before writing anything. Records arrive in any order, and a manager can appear after the people who report to them, as max and kim do here. That's why you build the whole map first and only then print.
Take it further
A chart deep enough to break recursion. Python stops at about 1,000 nested calls, and a long chain of managers can pass that. Switch the walk to an explicit stack of (id, name, depth) and push each manager's reports in reverse, so they still pop in input order. The worked version is below. It's also worth asking what a cycle in the records should do, since nobody in a cycle has a top to hang from.

Practice drills

Simple Bank System is LeetCode 2043, and no report has Chime asking it. It's the same shape as the card processor, a class holding balances with a rule on every call, and it's a good timed rep.

5

Simple Bank System

MediumRarely asked
Problem
Build a Bank class. The constructor takes balance, a list where balance[i] is the money in account i + 1. Accounts are numbered from 1.

deposit(account, money) adds money, and withdraw(account, money) takes it out if the account holds enough. transfer(account1, account2, money) moves money from the first account to the second if the first holds enough.

Each call returns true when it went through. A call naming an account outside 1 to n, or asking for more money than the account holds, returns false and changes nothing.
  1. Bank([10, 100, 20, 50, 30])
  2. withdraw(3, 10)→ true
  3. transfer(5, 1, 20)→ true
  4. deposit(5, 20)→ true
  5. transfer(3, 4, 15)→ false
  6. withdraw(10, 50)→ false

Account 3 drops to 10 after the withdraw, so the transfer of 15 fails. Account 10 does not exist.

How this uses the pattern

Keep the list and translate account numbers to index account - 1. Check the range and the balance before changing anything, so a failed call leaves every balance as it was.

Write it here, or go full screen with the problem, hints and solution beside the editor.

Simple Bank System

Loading...
Click "Run" to execute your code
The Chime angle
This isn't a Chime question. It drills the habit the credit card processor rewards: check every rule before you change any state. A transfer that subtracts first and then finds the second account is invalid leaves money missing. Do all the checks up front, then make both changes together.
Take it further
Grow it toward the card processor. Give each account a limit, accept the commands as strings like Deposit 2 $50, and return a sorted summary at the end. That turns this drill into the Chime problem above with a different rule set, which is good practice for adapting a class when the spec shifts.

What earns points

All four Chime problems are graded on more than the test count. A senior in 2021 and another in 2023 passed every test and were still rejected. Other feedback asked for readable code and for the candidate's thought process out loud. A 2026 candidate who solved the problem was then asked to optimize it in the last three minutes, so know your complexity before they ask.

Restate, build the base, then extend. Repeat the rules back on one small example, especially output formats like the org chart's dashes. Get the base class green with names a stranger could read. When the follow-up lands, extend the class you have, and say which structure you're keeping and why.

Common questions

Are Chime interview questions on LeetCode?

Some are. Browser history is LeetCode 1472, which candidates say Chime asks unchanged before adding its own follow-ups. The tabs version, the credit card processor and the org chart aren't on LeetCode. Chime also asks standard problems in some rounds, and the coding overview lists those.

How hard is the Chime coding interview?

Reports vary a lot. Short replies from Chime employees in 2026 range from "Leetcode easy" in March to "LC Hard" in October. The most detailed 2026 loop says Chime used to ask hards and has pulled back to mediums. The stateful problems on this page sit around easy to medium, and the grading leans on structure and communication.

Which platform and language?

Reports name CodeSignal, including a 2024 coding round and a January 2026 intern Superday, and CoderPad in 2020. You pick the language. Python keeps these problems short, since the parsing is a split and the state is a dict.

What should I practice first?

Browser history and the tabs follow-up, from a blank file, on a timer. Then the credit card processor, since it kept coming up from 2021 into 2025. Then the board game simulations in the next lesson, which include the newest named problem.

Key Takeaways

  • ✓Browser history is LeetCode 1472 at Chime through March 2026. Expect a visited check, then tabs, then users.
  • ✓A list with a cursor and a last index makes every history call O(1). Know why it beats two stacks.
  • ✓The credit card processor checks 12 to 16 digits and Luhn once at Add. Over-limit charges are declined.
  • ✓Passing every test is not enough. Readable state, a restated spec and a clean extension are graded too.
Chime interview guide

Know what Chime asks before you walk in.

17 coding · 3 system design · 20 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

What Chime Tests in CodingHad your Chime interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.