UnitedHealth Group interview question

Write pseudo code for all the above questions?