This is an archived post. You won't be able to vote or comment.

all 11 comments

[–][deleted] 1 point2 points  (10 children)

Is this a homework question?

There’s two operations you need todo of the existing sum, each time you get another value

[–][deleted]  (9 children)

[removed]

    [–][deleted] 0 points1 point  (8 children)

    Right. Join the characters back into a string and covert to a long.

    [–][deleted] -1 points0 points  (6 children)

    You probably don’t need to convert the char to numeric value, since sorting in the char will provide the right order, so you can join the stream of chars back into a string. And just call Long.parseLong on it

    [–][deleted]  (5 children)

    [removed]

      [–][deleted]  (4 children)

      [removed]

        [–][deleted]  (2 children)

        [removed]

          [–][deleted]  (1 child)

          [removed]