However, iterative methods are often useful even for linear problems involve many variables (sometimes of the order of millions), where direct methods would be prohibitively expensive (and in some cases impossible) even with the best available compute power. In computational mathematics, an iterative method is a mathematical procedure that uses an initial guess to generate a sequence of better approximate solutions for a class of problems, in which the N-th estimation is derived from the previous ones. The Conjugate Gradient method was also invented in the 1950s, with independent developments by Cornelius Lanczos, Magnus Hestenes and Eduard Stiefel, but its nature and applicability were misunderstood at the time. The theory of stationary iterative methods was solidly established with the work of D.M. young beginning in the 1950s. Only in the 1970s was it realized that conjugacy based methods work very well for partial differential equations, particularly the elliptic type.

COMING SOON!

```
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
bool isSymmetric(TreeNode *root) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
if (root == NULL)
return true;
queue<TreeNode*> lhs, rhs;
lhs.push(root->left);
rhs.push(root->right);
while (!lhs.empty() && !rhs.empty()) {
TreeNode *l = lhs.front(); lhs.pop();
TreeNode *r = rhs.front(); rhs.pop();
if (l == NULL && r == NULL) continue;
if (l == NULL || r == NULL) return false;
if (l->val != r->val) return false;
lhs.push(l->left); lhs.push(l->right);
rhs.push(r->right); rhs.push(r->left);
}
if (lhs.empty() && rhs.empty())
return true;
else
return false;
}
};
```