title: Check Number Is Perfect Square Using Additionsubtraction
signature: function checkNumberIsPerfectSquareUsingAdditionsubtraction($n) {
source_py: def check_number_is_perfect_square_using_additionsubtraction(n):
      i = 1
      the_sum = 0
      while (the_sum < n):
          the_sum += i
          if (the_sum == n):
              return True
          i += 2
      return False
source_cpp: bool check_number_is_perfect_square_using_additionsubtraction(int n) {
    for ( int sum = 0, i = 1;
    sum < n;
    i += 2 ) {
      sum += i;
      if ( sum == n ) return true;
    }
    return false;
  }