Java 8 no bitwise


  • 0
    J

    Lol I know this is kinda cheating but I didn't use +,- operator

    public class Solution {
        public int getSum(int a, int b) {
            return IntStream.of(a,b).sum();
        }
    }
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.