I'm writing a recursive function (for IDS/DFS algorithm), and using dynamic stack to save the nodes, which being initialized everytime I enter the function after some time I run out of memory and dont get an answer. Should I change my dynamic stack to regular stack, I mean from