Tag: ACTIVITY-STACK
“`cpp <h1>include <stdbool.h></h1> <h1>include <stdlib.h></h1> typedef struct Node{ void *data; struct Node *next; }node; typedef struct Stack{ node *top; }stack; bool push (stack *s , void *val) { node *n; n = create_node (val); if (n) { n->next = s->top; s->top = n; return true; } return false; } void* . . . Read more
Actualmente estoy trabajando en un proyecto que se supone que es un juego de adivinanza de palabras al revés. Así es como debería funcionar: Ingresa una palabra: (entrada = queso) Tu palabra es: _ _ _ _ _ o ¿Qué letra adivinas? (entrada = s) El usuario continúa adivinando la . . . Read more
Quiero obtener los valores de los parámetros en los Stack Frames obtenidos con la clase Stack Trace en c#. ¿Alguien puede proporcionar alguna orientación? Estoy realizando una codificación experimental. Quiero saber qué y cómo pasé mientras llegaba al lugar que encontré (nivel de llamada). Pero no quiero crear un mecanismo . . . Read more
Quiero usar la pila para verificar la validez de una expresión que contiene paréntesis anidados. Escribí el código de abajo pero cuando mi entrada es [{[]}, el código no devuelve nada, pero esperaba que devolviera “los paréntesis izquierdos son más que los derechos”. Además, cuando mi entrada es (), en . . . Read more
Vector auto-limpiante. Estoy buscando un tipo de dato similar a vector<T> o stack<T>, que recibe entradas de tipo <template T>, donde cada entrada ocurre un máximo de k veces. Si se supera k, se eliminan todas las ocurrencias por encima de k.