title: Algorithms :XOR operation
body: <p>You are given a sum S and X , you need to find , if it there exist two numbers a and b such that a+b = S and a^b = X 
  I used a loop upto S/2 and check if it is possible or not</p>
  
  <pre><code>for(int i=0;i&lt;=s/2;i++)
  {
     if(i^(s-i)==X)
      return true;
  }
  </code></pre>
  
  <p>complexity : O(n)</p>
  
  <p>Need some better approach </p>