Salesforce interview question

leetcode questions , Time Complexity of Algorithms