WhiteBox
DSA
Start coding DSA Beyond LeetCode System Design AI Engineering White Room
RoadmapProblem sets
Quizzes Dan Ladder Contests Templates Graph Editor
Guides Library
Login Sign up
Sign up Log in

Workspaces

Start coding DSA Beyond LeetCode System Design AI Engineering White Room

DSA

Overview Roadmap Problem sets Quizzes Dan Ladder Contests Templates Graph Editor CP Guessr

Library

Library Guides

Community

Leaderboard Contributors Refer & Earn Cosmetics

Tools

Resume Reviewer Job Boards Changelog

Basics 0/97

DSA 0 of 360 problems solved
0%
Overview

Curriculum

    1. Loops and simulation 0/17
      1. Basic syntax and I/O 0/10
      2. Simulation 0/7
    2. Time complexity 0/5
    3. Arrays 0/8
    4. Strings 0/7
    5. Stacks and queues 0/8
    6. Complete search 0/29
    7. Recursion 0/13
    8. Sorting and selection 0/10
  1. DSA
  2. / Basics

Loops and simulation · 2 of 2

Simulation

Carry out a process step by step: keep its state, apply each step in the right order, move on a grid with direction arrays, and skip ahead when the steps repeat.

3,786 words · 17 min read

Lesson Problems7 Reading4
  • usaco.guide Simulation Shell Game and Mixing Milk worked through, then graded Bronze simulation problems to practise on. usaco.guide (opens in a new tab)
  • en.wikipedia.org Cycle detection The tail and loop of a repeating sequence, the shape Mixing Milk takes, found with Floyd’s or Brent’s algorithm in constant memory. en.wikipedia.org (opens in a new tab)
  • oi-wiki.org 模拟 (Simulation) Advice for long simulations: plan on paper, split the code into functions and debug each part separately. oi-wiki.org (opens in a new tab)

More links1

  • USACO - Simulationusaco.guide (opens in a new tab)
Lesson: Simulation
Overview Roadmap Problem sets Log in