Stack

Stack

String and Math Operation

if when looping through string/array, current variable has direct influence to previous variable and both variable could be removed or modified after operation, then considering using stack as data structure.

  • 227 Basic Calculator II(Q:A)(stack)

keep in mind data structure: stack::top() -> sign -> tmp -> s[i]

PREVIOUSBootstrap and Random Forest
NEXTTree Advanced Topics