From 3 and 5 gallon jugs, how can you

Measure 4 gallons exactly?

❓❓

❓❓❓ three

❓❓❓❓❓ five

💧💧💧 three

❓❓❓❓❓ five

❓❓❓ three

💧💧💧❓❓ five

💧💧💧 three

💧💧💧❓❓five

💧❓❓ three

💧💧💧💧💧 five

💧❓❓ three

❓❓❓❓❓ five

❓❓❓ three

💧❓❓❓❓ five

💧💧💧 three

💧❓❓❓❓ five

❓❓❓ three

💧💧💧💧❓ five ✅

Idle

Every app starts in

some initial state

Idle

There can be a finite
number of states

Loading

Success

Failure

Idle

State can transition

to each other

Success

Failure

Loading

Idle

Events cause states

to transition

Success

Failure

Loading

LOAD

RESOLVE

REJECT

Idle

Loading

💥

0, 0

0, 5

3, 0

3, 5

3, 2

0, 2

2, 0

2, 5

3, 4

3, 3

1, 0

1, 5

0, 1

3, 1

0, 4

0, 3

0, 0

0, 5

3, 2

0, 2

2, 0

2, 5

3, 4

How was your experience?

𝘅

Good

Bad

Tell me why?

𝘅

Submit

Thanks for your feedback.

𝘅

Close

Ain't nothin' but a heartache

question

thanks

form

closed

CLICK_GOOD

CLICK_BAD

SUBMIT

CLOSE

CLOSE

CLOSE

A

B

C

D

E

Shortest paths

A

B

C

D

E

Shortest paths

A → C → E

A

B

C

D

E

Shortest paths

A → B → D → E

Weighted: Dijkstra's algorithm

A

B

C

D

E

Simple paths

A → C → E

A

B

C

D

E

Simple paths

A → C → E

A → B → D → E

A

B

C

D

E

Simple paths

A → C → E

A → B → D → E

A → B → C → E

A

B

C

D

E

Simple paths

A → C → E

A → B → D → E

A → B → C → E

A → C → B → D → E