Practice Interview Questions
| Question | Status |
|---|---|
Write a Python function that takes an integer as input and returns the sum of its digits. The function should work for both positive and negative integers. For negative numbers, the function should ignore the negative sign.
For n=123, the function should return 6 since 1+2+3=6. For n=-456, the function should return 15 since 4+5+6=15.
Constraints: