Skip to main content

All Questions

1 vote
1 answer
72 views

valid Parenthese using stack in c

I was solving the problem 20. Valid Parentheses in Leetcode using c and when they check this input s ="{[]}" the code returns false instead of true but I don't see any problem with the code:...
roger_hai's user avatar
0 votes
2 answers
52 views

Created function that pops the last value entered in the stack fails after second popping

struct n { int data; struct n* next; }; typedef struct n node; node* push(node* s, int x) { node* temp;// temporary element temp = (node*)malloc(sizeof(node)); if (temp == NULL) {...
trgtulas's user avatar
0 votes
2 answers
55 views

Missed Print Line

I am trying to print the program so it will look like this. Inserting 1 Inserting 2 Inserting 3 Top element is 3 Removing 3 Removing 2 Removing 1 The stack is empty But when I run the program, I ...
iFIKOZ's user avatar
  • 3
0 votes
0 answers
50 views

Infix to Postfix using C stuck execution after halfway. Can any one tell me why?

I've been trying implementing Infix to Postfix using Stack(using LL) in C Language. When I first executed the code with input like(e.g: a+b/c*d-e) it's showing the correct notation from infix to ...
UKi's user avatar
  • 1
0 votes
2 answers
66 views

Stack implimentation using Linkedlist in C

I have written a code in C language to implement a stack using LinkedList algorithm. Here is the code........ #include<stdio.h> #include<stdlib.h> #include<limits.h> struct ...
B.Sarkar's user avatar
  • 167
0 votes
1 answer
65 views

Stack using linked list error

Stack using Linked List I am getting the following errors: Exception thrown at 0x003D28A9 in ConsoleApplication3.exe: 0xC0000005: Access violation writing location 0x00000000`. Exception thrown at ...
Coder's user avatar
  • 1