79620992

Date: 2025-05-14 08:07:17
Score: 1
Natty:
Report link
String[] words = s.trim().split("\\s+");

// Input -> " Hi i am om "
// Output -> ["Hi", "i", "am", "om"]

// trim() removes leading and trailing spaces.
// One-line solution to split into words.
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: om bhor