You are viewing a single comment's thread. Return to all comments →
Because the author of the C# code hasn't used the generic version of the Stack class
Stack s = new Stack();
used rather than
Stack<char> s = new Stack<char>();
so he must do an explicit cast when retrieving elements from the Stack.
Seems like cookies are disabled on this browser, please enable them to open this website
Stacks: Balanced Brackets
You are viewing a single comment's thread. Return to all comments →
Because the author of the C# code hasn't used the generic version of the Stack class
used rather than
so he must do an explicit cast when retrieving elements from the Stack.