There is no single set way to write pseudocode. Even in traditional books you'll find various different ways it has been done. CLRS has pseudocode implementation very much similar to your first attempt.
I'd say any pseudocode has mainly 2 properties:
It should be easy to read
It should be easy to understand what it is doing
I'd say both the attempts are correct, since there are no fixed guidelines to writing pseudocode.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There is no single set way to write pseudocode. Even in traditional books you'll find various different ways it has been done. CLRS has pseudocode implementation very much similar to your first attempt.
I'd say any pseudocode has mainly 2 properties:
I'd say both the attempts are correct, since there are no fixed guidelines to writing pseudocode.