Mini-Project: The Efficiency Lab

Write two functions that both find duplicates in a list: one using nested loops, one using a set. Add a step counter to each so they report how much work they did. Run both on lists of 10, 100, and 500 items (build them with a loop) and print a comparison table of steps taken. Then answer in comments: at what size did the nested version become obviously worse, what is each function's Big O, and why does the set version win. Both languages.

SANKOFA SANDBOX
loading editor…
Your turn → Work through it step by step. This is a piece of the course project, not a throwaway exercise.

Built it in both languages?

Mark it done once your Python and JavaScript versions both run correctly. Honesty here is what makes the dashboard useful to you.

← BackNext: Module 24: A Practical Mini-Project →