LeetCode 3289: Two Sneaky Numbers in Digitville

LeetCode 3289 (The Two Sneaky Numbers of Digitville) Achieved a 0 ms runtime (Beats 100.00%) using a precise single-pass discovery approach! The goal is to find two numbers that appear twice in a list where everyone else appears once. I iterated through the numbers exactly once, tracking "seen" values.The moment a number is encountered again, it’s identified as "sneaky" and added to the results.By using simple, direct list interactions in Python, the solution hits the performance floor with no wasted cycles. #LeetCode #Python #Algorithms #Optimization #CleanCode #SoftwareEngineering #DSA

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories