LeetCodechevron_rightCategorieschevron_rightsimulation
smart_toy

simulation

171 problems
Easy: 75Medium: 85Hard: 11

simulation is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

Problem bank

simulation problem bank

Start with a compact scan-friendly list and progressively load more so the topic page stays readable even when the corpus is large.

Progressive topic library

Built for large topic sets: scan the structure first, then go deeper.

hourglass_bottomScroll to continue
search
tuneDifficulty

Showing 24 / 171 problems

+24 per load
#TitleDifficulty
43

Multiply Strings

Multiply Strings requires simulating integer multiplication using only string operations without direct numeric conversi…

Medium
54

Spiral Matrix

Given an m x n matrix, return all elements in spiral order starting from the top-left corner.

Medium
59

Spiral Matrix II

Generate a spiral matrix of size n x n, filled with elements from 1 to n² in spiral order, for interview-focused solving…

Medium
67

Add Binary

Add Binary involves summing two binary strings and returning the result as a binary string using math and string manipul…

Easy
68

Text Justification

Text Justification requires packing words into lines to match a specified width, ensuring even distribution of spaces.

Hard
258

Add Digits

Add Digits involves repeatedly summing digits of a number until a single digit is obtained.

Easy
289

Game of Life

Solve the Game of Life by updating each cell based on its eight neighbors using Array and Matrix simulation patterns eff…

Medium
412

Fizz Buzz

Generate a list from 1 to n replacing multiples of 3 with Fizz, 5 with Buzz, and both with FizzBuzz efficiently.

Easy
415

Add Strings

Given two non-negative integers as strings, sum them and return the result as a string without converting to integers di…

Easy
495

Teemo Attacking

Compute the total poisoned time Ashe experiences from Teemo's attacks using an array-based simulation approach efficient…

Easy
498

Diagonal Traverse

Traverse a matrix diagonally and return all elements in the specific zig-zag order required by the problem pattern.

Medium
537

Complex Number Multiplication

This problem requires multiplying two complex numbers, given in string form, and returning the result in the same format…

Medium
566

Reshape the Matrix

Reshape the Matrix involves transforming a 2D matrix into a new matrix with the same elements in row-major order, follow…

Easy
592

Fraction Addition and Subtraction

Solve fraction addition and subtraction by handling expressions, calculating results, and simplifying fractions to irred…

Medium
640

Solve the Equation

Solve the equation for the variable 'x' and determine its value or state if there is no solution or infinite solutions.

Medium
657

Robot Return to Origin

Judge whether a robot returns to the origin after a sequence of moves using string manipulation and simulation.

Easy
682

Baseball Game

Simulate baseball score operations using a stack-based approach to compute the final score after all operations.

Easy
735

Asteroid Collision

Determine the final positions of moving asteroids using a stack-based simulation for efficient collision resolution in l…

Medium
749

Contain Virus

Contain Virus involves using array-based Depth-First Search to contain viral spread by building walls around infected re…

Hard
832

Flipping an Image

Flip each row of a binary matrix horizontally and invert its values efficiently using a two-pointer scanning approach.

Easy
844

Backspace String Compare

Compare two strings after processing backspaces using efficient two-pointer scanning and careful invariant tracking to e…

Easy
867

Transpose Matrix

Transpose Matrix problem requires flipping a matrix's rows and columns to return the transposed version.

Easy
874

Walking Robot Simulation

The Walking Robot Simulation problem involves moving a robot in an infinite grid and calculating its furthest distance f…

Medium
885

Spiral Matrix III

Solve the Spiral Matrix III problem by simulating the movement across a matrix with specific constraints on direction an…

Medium

swap_vertScroll inside the bank to auto-load more

Related Patterns

Simulation LeetCode Problems: 171 Solutions