0
0
LLDsystem_design~10 mins

State diagrams in LLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the initial state in a state diagram.

LLD
stateDiagram-v2
    [*] --> [1]
Drag options to blanks, or click blank then click option'
AIdle
BStart
CRunning
DStopped
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a state that is not the starting point.
2fill in blank
medium

Complete the code to add a transition triggered by an event.

LLD
stateDiagram-v2
    Idle --> Running : [1]
Drag options to blanks, or click blank then click option'
Astop
Breset
Cpause
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using an event that stops or pauses instead of starting.
3fill in blank
hard

Fix the error in the transition label to correctly represent the event.

LLD
stateDiagram-v2
    Running --> Paused : [1]
Drag options to blanks, or click blank then click option'
Apause
Bstart
Cstop
Dresume
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' or 'stop' instead of 'pause'.
4fill in blank
hard

Fill both blanks to define a transition with an action on event.

LLD
stateDiagram-v2
    Paused --> Running : [1] / [2]
Drag options to blanks, or click blank then click option'
Aresume
Bstart
CnotifyUser
Dstop
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up events and actions in the transition label.
5fill in blank
hard

Fill all three blanks to define a transition with event, guard condition, and action.

LLD
stateDiagram-v2
    Running --> Stopped : [1] [[2]] / [3]
Drag options to blanks, or click blank then click option'
Astop
BisEmergency
ClogStop
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing event with action or guard condition.