As far as I know stack.push() have a O(1) time complexity but is it actually correct if I use a stack of string.
stack<string> stringStack;
string inputString;
while(cin >> inputString) {
stringStack.push(inputString); // what is the time complexity of this line
}