class Solution {
public:
int titleToNumber(string s) {
int num = 0;
for(int i = 0; i < s.size(); i ++)
{
num = num * 26 + (s[i] - 'A' + 1);
}
return num;
}
};
class Solution {
public:
int trailingZeroes(int n) {
return n < 5 ? 0 : n / 5 + trailingZeroes(n/5);
}
};
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class BSTIterator {
public:
stack<TreeNode*> stk;
BSTIterator