This question runs in a pre-configured Salesforce environment - no personal connection required.

Update the Rating on each Account in the supplied list of Ids based on the NumberOfEmployees field. Use Hot when employees is greater than 1000, Warm when employees is between 100 and 1000 inclusive, and Cold when employees is less than 100. Skip accounts whose NumberOfEmployees is null. Return the number of accounts that were updated. Return 0 for null or empty input.

Examples:

Input: accountIds = [001..., 001..., 001...] Output: 3 Explanation: All three accounts have an employee count and receive a rating Input: accountIds = [] Output: 0 Explanation: Empty input results in zero updates Input: accountIds = null Output: 0 Explanation: Null input results in zero updates
Apex Code Editor

Welcome to Lightning Challenge!

How It Works

  • • Write your solution in the code editor
  • • This challenge runs without connecting your own org
  • • Submit to check if your solution passes
  • • Use hints if you get stuck

Contest Alert

🏆 #CodeEveryDay July 2026

Contest runs July 1 - 31. Complete challenges to climb the leaderboard!

Only the 31 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In