Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

4 votes

Show a list of downloads

I am going break this into three parts: Your question about the observer. Some big picture questions about the broader design. And a ton of tactical observations regarding the code in the question. ...
Rob's user avatar
  • 2,552
3 votes
Accepted

Write a Swift-function, which computes the Digital Root

Your implementation of computeSum converts the number to a string, then splits the string into an array of substrings (one for each digit), and finally converts the ...
Martin R's user avatar
  • 23.3k
3 votes

Write a Swift-function, which computes the Digital Root

formally correct? No. accu += Int(curr) ?? 0 Most authors don't define Digital Root for negative integers, preferring to stick to the natural numbers, ...
J_H's user avatar
  • 28.1k

Top 50 recent answers are included