โ† SAP questions
CodingReported in a candidate post, Sep 2020

Count words in a sentence

Filed under SAP

Given a string `sentence`, write a function to count the total number of words in it. Words are defined as non-empty sequences of characters separated by whitespace.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related SAP questions

Collected from public candidate posts and coding forums. Updated Nov 2026.