Skip to main content

47 docs tagged with "Simulation"

View all tags

Add Digits

Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.

Add Strings

This is a solution to the Add Strings problem on LeetCode.

Ant on the Boundary (LeetCode)

Determine how many times an ant returns to the boundary after reading an array of non-zero integers and moving according to their values.

Faulty Keyboard

This is a solution to the Faulty Keyboard problem on LeetCode.

Fizz Buzz(LeetCode)

Given an integer n, return a string array answer (1-indexed) where "FizzBuzz" if i is divisible by 3 and 5, "Fizz" if i is divisible by 3, "Buzz" if i is divisible by 5, i (as a string) if none of the above conditions are true.

Pour Water.

This is a solution to Pour Water problem on LeetCode.

Reverse Integer(LeetCode)

Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.

Spiral Matrix

This document provides a solution to the Spiral Matrix problem, where the goal is to traverse a matrix in spiral order.

Teemo Attacking

This is a solution to the Teemo Attacking problem on LeetCode.

Walking Robot Simulation II

Implement a walking robot simulation on a grid where the robot moves forward, turns, and follows specific instructions.