Skip to content
← Back to the archive

6 September 2026

Sticker Album

Hard Lists Dictionaries

Find the first draw that completes a page of needed stickers.

You are given sticker names drawn one at a time and a list of stickers needed for one album page. Read the draws from left to right. Keep track of which needed stickers have appeared. Extra stickers do not matter. Return the draw number when every needed sticker has appeared for the first time. Draw numbers start at 1. Return 0 when no stickers are needed. Return -1 when the page is not completed.

Constraints

  • draws contains at most 200 lowercase sticker names
  • needed contains different lowercase sticker names
  • A sticker may appear more than once in draws

Function signature

def first_completed_page(draws, needed):

Sign in to solve this bracket

Reading the problem is free for everyone. Opening the editor and solving it requires an account with Open Bracket+.