Stack Bash - Master data structures and algorithms

Sum of Two Integers

Hard
Given two 32-bit integers a and b, write a function that returns the sum of a and b without using arithmetic operators ( +, -, /, etc.).
For example, given the following inputs:
a = 3
b = 12
Your function should return 15.

Try it first

Solution

6 Essential Primitives Coding Interview Problems

Master Primitives by trying the coding challenges below.
  1. 1.Swap bitsEasy
  2. 2.Power of twoEasy
  3. 3.Count bitsMedium
  4. 4.Reverse bitsMedium
  5. 5.Find duplicateMedium
  6. 6.Bitwise additionHard