Procore Technologies interview question

Read the function summary and test cases, and write your logic