package com.sunny.grokkingalgorithms.fasttrack;

/**
 * Created by sundas on 6/17/2018.
 */
public class Poweroftwo {

  public static void main(String[] args) {

    int a = 3;
    while(a != 1){
      if(a %2 == 0){
        System.out.println("true");
        break;
      }
      a = a/2;
    }


  }
}

@@ -292,15 +292,80 @@
 %0A    %7D%0A%0A
+    a = 4;%0A    int x = a&(a - 1);%0A    System.out.println(x == 0);
 %0A  %7D%0A%7D%0A

Check if a number is power of 2