Library/Coding patterns that get asked/Rotate and dedupe what users see

No repeated titles on the first screen

85 min6 partsCoreFundamentalsChecked Dec 2026
Start the lessonShort steps, each with something to do
What you'll learn
  • Keep one seen-set for the whole screen, check a title before you place it, and add it the moment you do
  • Fill a row's slots with its best free titles in one forward pass, then put the rest of the row after them in its own order
  • Decide on purpose what a row does when it runs out, and what an exempt row or a row with no slots adds to the screen
  • Read the screen as a grid, keep one set per column, and say why the one-pass scan breaks under a column rule
  • Show where greedy by rank leaves a slot empty, and fill the most slots with augmenting paths when that is the goal
  • Test a dedup the way an interviewer expects: invariants that any right output keeps, and random pages checked against them
Part 1 of 6about 13 min
The screen as a set

No repeated titles on the first screen

Netflix software engineer candidates report a homepage dedup question. One got it in a technical screen and had to write their own test cases after the code (1 report). Another got it in a phone screen that was more about talking it through than about code (1 report), and a third report lists only its title (1 source). It starts like this:

The homepage is a list of rows, top to bottom. Each row is a list of title ids, best first. The first screen shows the first width titles of every row.

Write dedup_homepage(rows, width). Fill each row's slots left to right with the row's best title that isn't on the screen yet. After the slots, the rest of the row follows in its order, with no title twice in one row. If no title fits a slot, the row ends there.

With width = 2:

  • [["A", "B", "C"], ["B", "A", "D", "E"], ["C", "F", "A"]] returns [["A", "B", "C"], ["D", "E", "B", "A"], ["C", "F", "A"]].
  • [["A", "B"], ["B", "A", "C"]] returns [["A", "B"], ["C"]], because after C every title is on the screen.

The follow-ups that candidate reports are a different width for each row, and special rows that skip the dedup (1 report). The phone screen put the rule another way: no row and no column of the first screen may repeat a show (1 report). Read literally, that lets a title appear twice on the screen, in different rows and different columns. The last level asks for that rule.

You don't write it yet. The lesson starts with the set that remembers what the screen shows, then fills one row, then the page, then the grid. At the end you solve the whole problem, level by level, in an interview simulation with a 45-minute timer.

This lesson builds on the seen-set from the hash maps lesson. It pairs with the billboard rotation: both decide what a Netflix viewer sees first.

The first screen is the first few slots of every row

The data is a list of lists. Row 0 is the top of the page, and inside a row, position 0 is the best title, the one the ranking put first. The screen shows a fixed number of slots from the left of each row. The viewer sees the rest of a row only after scrolling it sideways.

So the screen is a slice of every row:

PAGE = [["A", "B", "C"], ["B", "A", "D", "E"], ["C", "F", "A"]]
print([row[:2] for row in PAGE])
[['A', 'B'], ['B', 'A'], ['C', 'F']]

Here it is as a grid, with the two slots on the screen in the left panel. A and B each appear twice on the screen. That is the problem in one picture.

PAGE with width 2, before any dedup
on the screen
01row 0ABrow 1BArow 2CF
past the screen
23row 0Crow 1DErow 2A

Row 1 repeats B and A from row 0. The C in row 2 is fine: row 0's C is past the screen.

Two facts follow, and the whole problem rests on them:

  • A title past the screen is not on the screen. Row 0's C doesn't stop row 2 from showing C.
  • A short row shows what it has. row[:width] never fails, it just returns fewer titles.

The first thing to write is the checker, before any fix: which titles does the screen show more than once? A Counter over the screen's titles answers it.

In the editor, write screen(rows, width), the screen as a list of slices, and screen_repeats(rows, width), the titles it shows twice or more, sorted.

A set answers "is it on the screen yet?" without a scan

Counting works when you have the whole screen. To fix the screen you go the other way: walk the slots in the order they load, and ask each title one question, is it on the screen already?

A seen-set answers that in O(1) on average. Make it once, before the loop over rows, and it remembers every row above:

seen = set()
for r, row in enumerate(rows):
    for j, title in enumerate(row[:width]):
        # check first
        if title in seen:
            # (r, j) repeats a title
            ...
        # then remember it
        seen.add(title)

Two lines decide whether this is right.

Where seen is made. Put seen = set() inside the row loop and it forgets every row above. It still catches a title twice in one row, so a test with a repeat inside one row passes. The page in the last step slips through.

Check, then add. Add first, and every title is "already there" when you check it.

Predict

A homepage has 40 rows on its first screen, 6 slots each. With a list as the seen-list, how many comparisons can checking the last slot take?

Pick an answer above to see the rest

Keep the first copy of each title in a row

The second rule lives inside one row: no title twice. Rows come from different rankers, and a row can list one title twice, a show in two genres for example. The dedup keeps the first copy, because the row's order is its ranking, and the first copy is where the ranker wanted it.

dict.fromkeys does exactly that. A dict keeps its keys in the order they first went in, and a key that comes again changes nothing:

row = ["C", "A", "C", "B", "A"]
print(list(dict.fromkeys(row)))
print(sorted(set(row)))
Predict

What does list(dict.fromkeys(['C', 'A', 'C', 'B', 'A'])) give?

Pick one to see what it prints.
Pick an answer above to see the rest
Part 1 done
Part 2 of 6about 17 min
Filling a row

Fill a slot with the row's best title that isn't taken

Now the fix. A row fills its slots one at a time, left to right, and each slot takes the best title the row still has that isn't on the screen. "Best" means first in the row, so the slot takes the first free title in the row's order.

next with a default says it in one line:

row, taken = ["B", "A", "D", "E"], {"A", "B"}
print(next((title for title in row if title not in taken), None))
print(next((title for title in row if title not in {"A", "B", "D", "E"}), None))
D
None

The generator walks the row and yields only the free titles. next takes the first one. The None matters: without a default, a row with nothing free raises StopIteration, and that error surfaces far from the cause.

Predict

Row 1 of PAGE is B, A, D, E, and the screen holds A and B. Which title does its slot 0 get?

Pick an answer above to see the rest

Fill the slots of one row left to right

One slot is best_free. A row is that, width times, with one change between slots: the title you just placed is on the screen now.

Call the part of a row on the screen its head.

Adding the pick to shown at once does two jobs. Rows below can't show it, which is the page rule. And the next slot of this row can't take it again, which is the row rule. With ["C", "C", "F"], slot 0 takes C, and the second C is then blocked for slot 1, so slot 1 takes F.

Stopping at the first slot that nothing fits is the decision about running out. If no title fits slot 1, slot 2 can't be filled either: nothing becomes free as you go right. So the row stops.

Here the shared shown set carries the screen from one row to the next:

shown = set()
for row in PAGE:
    print(fill_row(row, 2, shown))
['A', 'B']
['D', 'E']
['C', 'F']

Rows 0 and 2 keep their first two titles. Row 1 skips B and A and shows D and E.

The editor holds best_free from the last step. Write fill_row(row, width, shown): up to width titles, each the best one not in shown, added to shown as you place it.

One index walks the row once

fill_row starts each slot's scan at the front of the row. That repeats work: a title that was on the screen when slot 0 looked at it is still on the screen for slot 1. Under the screen rule nothing ever leaves shown, so a blocked title stays blocked.

So keep one index that only moves forward:

head, i = [], 0
while len(head) < width and i < len(row):
    title = row[i]
    i += 1
    if title not in shown:
        head.append(title)
        shown.add(title)

Every title is looked at once at most. A row of length L costs O(L), not O(width × L).

Checks against shown, for a row of 200 titles whose first 150 are on the screen, width 40
rescan per slot
6,820
one index
190

The rescan looks at the same 150 blocked titles for every one of the 40 slots. The single index passes them once.

Keep this trick in mind for later. It leans on one fact, that blocked stays blocked, and the grid rule in part 4 breaks that fact.

In the editor, write fill_row_fast(row, width, shown): the same result as fill_row, checking each title against shown at most once. The tests count the checks.

After the screen, the rest of the row follows in its order

The screen takes a few titles from a row. The rest still belong in the row, because the viewer can scroll it. Q-nfx-048 says it directly: past the first n positions, a row only has to avoid repeating itself.

So the row's rest is every title not in the head, in the row's original order, each once. The titles skipped for the screen come back here, in their place:

row, head = ["B", "A", "D", "E"], ["D", "E"]
rest = [t for t in dict.fromkeys(row) if t not in head]
print(head + rest)
['D', 'E', 'B', 'A']

B and A were on the screen in row 0, so row 1 couldn't show them up front. Past the screen they're fine, and they keep the order the ranker gave them.

Three ways to get this wrong, each of them easy to write:

  • head + row[len(head):], cutting at the head's length. That assumes the head was the row's first titles. Here it would add E again and lose B and A.
  • [t for t in row if t not in head] keeps a title the row lists twice.
  • Sorting the rest throws away the ranking, the one thing the row's order is for.

In the editor, write finish_row(row, head): the head, then every other title of the row in its order, each once.

A row that runs out ends

One case is left: the head came back short. That happens when the row has fewer free titles than slots. What goes after it?

Every title still in the row is on the screen already, or the head would have taken it. Append the rest, and those titles land in the empty slots of the screen, which repeats them. So the rule is: a short head ends the row.

Predict

The screen holds A and B. Row B, A, C with width 2: what does the row become?

Pick an answer above to see the rest
Part 2 done
Part 3 of 6about 15 min
The whole page

Go down the rows with one set

Level 1 is place_row in a loop, with one shown set for the whole page.

The order of the rows matters. The top row is placed first, so it keeps its best titles, and each row below gets what's left. That's the right priority for a homepage: the rows near the top are the ones every viewer sees.

Here is the page from the start of the lesson, row by row:

PAGE, width 2, after level 1
before
row 0ABCrow 1BADErow 2CFA
after
row 0ABCrow 1DEBArow 2CFA

Row 1 shows D and E on the screen, and B and A move past it. The first two columns are the screen.

Two things a test should check, because both are easy to break:

  • shown must be made once. A new set per row only stops a row repeating itself. A set holding only the row above misses rows two apart.
  • The input must not change. The rows came from a ranker, and some other code may read them after you. place_row builds new lists, so return those and never write into rows.

In the editor, place_row is given. Write dedup_homepage(rows, width) with one shown set for the page.

Titles past the screen block nothing

The most common slip in this problem is a line that looks careful. After a row is placed, it seems tidy to add all of its titles to shown. But only the head is on the screen. A title past the screen is something the viewer sees only after scrolling that row, so it must not stop a row below from showing it up front.

This is the line q-nfx-048 draws: global dedup for the first n positions, and only the row's own dedup after that.

Width 2: row 0's C is past the screen
right
row 0ABCrow 1CD
with the tail added to shown
row 0ABCrow 1D

Adding the whole row to shown blocks C in row 1, though the viewer never saw it. Row 1 shows D, and then nothing fits slot 1.

A test with no title shared between one row's tail and another row's head will never catch it. Most hand-made examples have none: they are written to show the dedup working, so the shared titles sit on the screen. That's why this task's tests build exactly that case, a title past the screen in one row and first in the next.

The code in the editor has this bug. Find the line in dedup_homepage that puts titles past the screen into shown, and fix it.

A width for each row

The first follow-up in q-nfx-048 is a different n for each row. A real homepage has that: a row of big posters fits fewer titles across than a row of small tiles.

The clean way is to make the int case look like the list case, once, at the top:

print(widths_for(PAGE, 2))
print(widths_for(PAGE, [1, 0, 3]))
[2, 2, 2]
[1, 0, 3]

After that, zip(rows, widths) hands each row its own width, and nothing else changes. That's the sign of a good level 1: the follow-up is a two-line change, not a rewrite. The opposite design, an if on the type of width inside the row loop, works too, but it spreads one decision over the whole function, and the next follow-up has to find it.

Predict

PAGE with widths [1, 0, 3]. What does row 2, C, F, A, become?

Pick an answer above to see the rest

Rows that skip the dedup

The second follow-up in q-nfx-048: some special rows don't need global dedup. Think of a row of shows the viewer is partway through. If a title is in it, it should stay in it, even if the trending row above has it too.

Say three choices out loud, because the report doesn't settle them:

  1. Does an exempt row check the screen? No, that is what exempt means.
  2. Does it still drop its own repeats? Yes. One row showing a title twice is wrong whatever the row is.
  3. Do its titles block the rows below? Here, no. The exempt row sits outside the dedup.

Choice 3 could go the other way, and an interviewer may ask why. A row that shows a title the viewer already sees in "continue watching" may still be fine below it, and one rule for exempt rows is simpler to explain.

With place_row, all three choices are one argument. Give an exempt row a fresh empty set:

out.append(place_row(row, width, set() if r in exempt else shown))

The empty set means nothing is on the screen as far as this row knows, so it checks nothing. place_row still adds the row's picks to that set as it goes, which drops the row's own repeats. And the page's shown never hears about it.

In the editor, place_row is given. Add exempt, a set of row indexes, to dedup_homepage(rows, width, exempt).

Part 3 done
Part 4 of 6about 15 min
Rows and columns

The screen is a grid of rows and columns

Q-nfx-063 puts the rule another way: within the first screen, no row and no column may hold a repeated show. Column j is slot j of every row, top to bottom.

Read literally, that is weaker than level 1. A title may appear twice on the screen, as long as the two copies share no row and no column:

Two screens, width 2
passes the grid rule
01row 0ABrow 1BA
breaks it
01row 0ABrow 1AC

On the left A and B each appear twice, in different rows and columns. On the right, column 0 holds A twice.

In an interview, ask which one they mean before you code. A product reason for the grid version: the eye scans across a row and down a column, so a repeat there is what a viewer notices.

Rows can be short, so the columns are ragged. That rules out the usual trick for columns, zip(*screen), which stops at the shortest row:

screen = [["A"], ["B", "C"], ["D", "C"]]
print(list(zip(*screen)))
print([row[1] for row in screen if 1 < len(row)])
[('A', 'B', 'D')]
['C', 'C']

zip drops column 1 entirely, along with the repeated C in it. Build each column with a comprehension that skips the rows too short to have that slot.

In the editor, write column(screen, j) and grid_ok(screen), which says whether every row and every column is free of repeats.

One set per column

Under the grid rule, one shown set for the page is the wrong memory. A title blocks only its own column, so keep one set per column:

from collections import defaultdict

# slot j -> titles in column j so far
columns = defaultdict(set)

A slot j takes the row's best title that passes two checks:

  • not in this row's head already, the row rule
  • not in columns[j], the column rule

When a title is placed in slot j, it goes into columns[j] and nowhere else.

Predict

Columns so far: column 0 holds A, column 1 holds B. The row is A, B, C, width 2. What does it show?

Pick an answer above to see the rest

A title skipped in one column can fill the next

Part 2 filled a row with one forward index, because a blocked title stayed blocked. Under the grid rule that is no longer true. A title blocked in column 0 may be free in column 1.

Row B, C, under column 0 holding B
one forward index
01rowC
rescan per slot
01rowCB

The index passed B at slot 0 and never comes back. A rescan finds B free in column 1.

So under the grid rule each slot scans the whole row again. It costs O(width × L) per row instead of O(L). For a homepage, with a few slots and rows of a few dozen titles, that is nothing. Say the cost anyway, and say why the fast version doesn't apply here: its one assumption broke.

Keeping both rules in one function is easy once you see it: the only difference is the question "is this title blocked for slot j?". Under the screen rule the answer is title in shown, and under the grid rule it is title in columns[j]. Write one blocked(title, j) and one fill loop.

The code in the editor has the one-pass index from part 2, under the grid rule. Find the bug in fill_row_grid and fix it, so each slot looks at the whole row.

Greedy by rank can leave a slot empty

Greedy fills each slot with the best title that fits it, never looking ahead. Under the screen rule that's safe. Under the grid rule it can fail. Here column 1 already holds B:

def greedy(row, width, columns):
    head = []
    for j in range(width):
        pick = next((t for t in row if t not in head and t not in columns[j]), None)
        if pick is None:
            break
        head.append(pick)
    return head


print(greedy(["A", "B"], 2, [set(), {"B"}]))
['A']

Greedy puts A in slot 0, because A is the row's best title. Then slot 1 needs a title other than A and B, and the row has none. But B, A fills both slots: B is free in column 0, and A is free in column 1.

So there is a real choice, and it's a product choice before it's an algorithm:

  • Rank first. Each slot gets the best title that fits, as the problem says. Sometimes a slot stays empty.
  • Fill first. Fill the most slots, even if it moves a lower-ranked title ahead of a better one.

The practice problem asks for rank first, and you should say that you noticed the other option. To know what rank first costs, compute the best count. With a handful of titles, trying every order is fine: 8 titles in 2 slots is 56 orders.

In the editor, greedy_count is given. Write best_count(row, width, columns): the most slots, from slot 0 with no gap, that any order of different titles can fill. Use itertools.permutations.

Watch · 4 min

Five people and five books, each person willing to read some of them. From 4:41 a greedy match leaves a person without a book, the way greedy by rank left a slot empty here, and from 6:11 he finds the true maximum as a flow through the graph. Titles and slots are his people and books, and the follow-ups fill the most slots with augmenting paths.

Unweighted Bipartite Matching | Network Flow | Graph Theory · WilliamFiset · Sep 2018YouTube
Part 4 done
Part 5 of 6about 10 min
The worked example

A worked example: each title at most m times on the screen

A related question, worked the way a candidate should take it: allow each title on the first screen up to m times, not once. A product team might want that for a big launch, shown in a few rows on purpose.

1. Say the rules back.

  • m = 1 is level 1, so the old tests are tests of this too.
  • A row still never shows a title twice, whatever m is.
  • Titles past the screen still don't count.
  • A slot nothing fits still ends the row.

2. Write the checker before the code. It is short, it is obviously right, and it tells you whether any output is legal: count the titles in row[:width] over the page, and check that no count passes m and no row repeats itself.

Predict

Width 1, m = 2. The output is A, B / A, C / A, D. Does it obey the cap?

Pick an answer above to see the rest

A Counter takes the set's place

3. Change the one question. Level 1 asked title not in shown. The cap asks count[title] < m, and placing a title adds 1 to its count. A Counter returns 0 for a title it hasn't seen, so there is no special case.

4. Find what the old code got for free. In level 1, shown did two jobs: the page rule and the row rule. A title placed in slot 0 was in shown, so slot 1 couldn't take it. A count doesn't do the second job. With m = 2, a row A, A, B passes count["A"] < 2 twice and shows A, A.

So the row gets its own set again, the way the grid rule needed one:

if title not in in_row and count[title] < m:
    head.append(title)
    in_row.add(title)
    count[title] += 1

This is the step to say out loud in an interview. The change looks like a one-word swap, and the bug it hides shows up only when m is 2 or more, so the level 1 tests pass.

The one-pass index still works here: a title blocked by the cap stays blocked, because counts only go up. That's the same test as before. Ask whether blocked stays blocked, and the fast scan is safe exactly when it does.

In the editor, write cap_homepage(rows, width, m): level 1, except a title is blocked once the screen shows it m times, with a set for the row.

Test it on many random pages against the checker

5. Test. Hand-written cases catch the bugs you thought of. Random pages catch the rest, as long as you have a checker that knows a legal output when it sees one. That is obeys_cap.

The recipe:

  1. Draw a small random page from a seeded random.Random, so a failure can be replayed.
  2. Run the code on it.
  3. Check the output with obeys_cap, and check that each row only holds titles from its input row.
  4. Return the first page that fails, small enough to read.

Small alphabets find more bugs. With titles A to F and rows of up to 6, repeats inside a row and across rows come up on almost every page, which is where this problem's bugs live.

Predict

You run 300 random pages with m = 1 against the version that has no set for the row. How many fail?

Pick an answer above to see the rest
Part 5 done
Part 6 of 6about 15 min
Follow-ups

What interviewers ask next

The reports name two follow-ups, and the practice problem turns both into levels: a different n for each row, and rows that skip the dedup (1 report). The rest of this part covers questions that follow naturally from the design. They are not from the reports, but each one tests whether you understood the pieces.

  • What does the dedup cost the ranking? Every title pulled onto the screen from deeper in a row is a worse pick than the ranker wanted. Measure it.
  • What if rows load as the viewer scrolls down? Then there is no list of rows, only one row at a time, and shown has to live between calls.
  • What if every slot should be filled? That is the fill-first choice from part 4, and greedy can't do it.
  • What tests would you write? One candidate had to write their own test cases after the code (1 report).

Start with the cost to the ranking. For each slot j on the screen, the title came from its first position in the row. The gap between the two is how far the dedup pulled it up:

row, placed = ["B", "A", "D", "E"], ["D", "E", "B", "A"]
first = {}
for i, title in enumerate(row):
    first.setdefault(title, i)
print([first[t] - j for j, t in enumerate(placed[:2])])
[2, 2]

D moved from 2 to 0 and E from 3 to 1, 4 places in all. Summed over a page and averaged over many viewers, this is the number to watch when someone wants a stricter rule. A big jump means the rows are too alike, and the fix belongs in the rankers, not the dedup.

In the editor, write pulled_up(row, placed, width): the sum, over the slots on the screen, of how far each title came from.

What if rows load as the viewer scrolls down?

A real homepage doesn't build all its rows at once. It renders the first few, and builds more as the viewer scrolls down. Then dedup_homepage(rows, width) has nothing to loop over. Each row arrives alone, and the page has to remember what it shows between calls.

That memory is state, so it belongs in an object: a Homepage that makes its own shown set, and places each row with place_row as the row arrives.

One Homepage per viewer's page load. Each call to add places one row against everything above it, in the order the rows arrive.

The trap is where the set is made:

class Homepage:
    # one set, shared by every Homepage
    shown = set()

A set written in the class body is made once, when the class is defined, and every instance shares it. The first viewer's titles then block the second viewer's screen. A test with one page passes. Two pages catch it.

Two more questions an interviewer may add here, with short answers:

  • Rows below the first screen. Under level 1 every row's head counts. On a real page, rows below the first screen could reset or use their own rule. Ask which.
  • Many servers. The set is per page load, so it never leaves one request. Nothing needs to be shared.

In the editor, place_row is given. Write the class Homepage with __init__ and add(row, width).

What if you must fill as many slots as you can?

Back to the grid rule's fill-first choice. Trying every order works for 8 titles. For 30 it's hopeless: 30 titles in 30 slots is about 2.65 × 10³² orders.

The problem underneath is a matching. Titles on one side, slots on the other, a line wherever a title may sit in a slot. You want the most lines with no title and no slot used twice. That is maximum bipartite matching, and an augmenting path solves it:

  1. Give slot j a title that is free and allowed.
  2. If every allowed title is taken, pick one, say T in slot k, and try to give slot k a different title, by the same rule.
  3. If that works, slot k moves, and T goes to slot j.
Row A, B, C, with column 1 holding C and column 2 holding B and C
greedy
012rowAB
augmenting path
012rowCBA

Slot 2 can only take A. A is in slot 0, and slot 0 can take C instead, so A moves to slot 2.

Each slot's search visits each title at most once, so this costs O(width × titles × checks), polynomial instead of factorial. A tried set per search stops it from going around in a circle.

This fills the most slots, but not always from slot 0 with no gap. If the screen can't have a gap, ask the matching whether slots 0 to k - 1 can all be filled, for the largest k. And either way the row's order is no longer the ranking's order. That is the trade to state.

In the editor, write max_slots(row, width, columns): the most slots, any of them, that different titles of the row can fill under the grid rule.

What tests would you write?

One candidate had to write their own test cases after the code (1 report). Don't list examples. List the rules a right output keeps, then the edges.

Rules any output must keep, checked by code against any input:

  • No title twice on the screen (or in a row or column, under the grid rule).
  • No title twice in one row.
  • No title that wasn't in its input row.
  • The input rows are unchanged.

Edges, one test each:

  • A title in one row's tail and another row's head. It catches tail titles going into shown.
  • A row that runs out, and a row shorter than the screen.
  • A width of 0, and an exempt row with a repeat inside it.
  • Rows two apart that share a title. It catches a set that remembers only the row above.
  • Under the grid rule, a title blocked in column 0 that fits column 1.

The rule checks also run on random pages, as in the worked example.

In the editor, write problems(rows, width, out): the sorted names of the rules out breaks, screen, row or unknown.

The practice problem, start to finish

That's every piece the practice problem needs. It asks for every level from the start of the lesson, from a blank file, and the interviewer follows up after each one.

Check yourself
6 questions
  1. 1.Width 2. Row 0 is A, B, C and row 1 is C, D. What does row 1 become under level 1?

  2. 2.Your level 1 makes shown = set() inside the loop over rows. Which test catches it?

  3. 3.Under the screen rule, why is one forward index enough to fill a row?

  4. 4.Screen holds A and B, width 2, row B, A, C. Why does the row end after C instead of going on to B and A?

  5. 5.Under the grid rule, column 1 holds B, and the row is A, B with width 2. What does greedy by rank show, and what is the most it could fill?

  6. 6.You swap level 1's set for a Counter so each title can appear up to m times. Which test can still pass while the code is wrong?

Practice