(Model deprecated version) Edge transition

How will you code these examples?

1

2

Both examples should be coded as moderate