JAVA solution beats 100% using bit manipulation (AND,XOR & left shift) with helpful video
Runtime: 0 ms, faster than 100.00% of Java online submissions for Sum of Two Integers.\nMemory Usage: 36.2 MB, less than 6.67% of Java online submissions for Su
Runtime: 0 ms, faster than 100.00% of Java online submissions for Sum of Two Integers.\nMemory Usage: 36.2 MB, less than 6.67% of Java online submissions for Sum of Two Integers.\n\n```\nclass Solution {\n    public int getSum(int a, int b) {\n        while(b != 0){\n            int carry = a & b;\n            a = a ^ b;\n            b = carry << 1;\n        }\n        return a;\n    }\n}\n```\n\nFor explaination video, you can refer : \n1. https://www.youtube.com/watch?v=qq64FrA2UXQ&list=PLPH4qLekBfwk7TiRjOfg2DhRL3vqMTwFZ&index=6&t=0s\n2. https://www.***.org/add-two-numbers-without-using-arithmetic-operators/\n\nHope you find this useful :)
[]