Unit 3 | Lec 4 | Applications of Stacks | Checking Valid or Invalid Parentheses | Data Structures
@VimalKaushik-g3t Please Like, Share, and Subscribe. If any doubts or feedback, please comment below. In this video, we discussed about 1. Introduction to stacks 2. Applications of stacks 2.2 Checking whether parentheses are valid or invalid. Here is the C program for implementing, #include(less than symbol)stdio.h(greater than symbol) #include(less than symbol)stdlib.h(greater than symbol) #include(less than symbol)stdbool.h(greater than symbol) #define max 20 int top = -1; char stack[max]; void push(char ch) { stack[++top] = ch; } char pop() { return stack[top--]; } bool isEmpty() { if(top == -1) { return true; } return false; } int main() { char input[max]; printf("Enter the string: "); scanf("%s",input); for(int i=0 ; input[i]!='\0' ; i++) { if(input[i] == '(' || input[i] == '[' || input[i] == '{') { push(input[i]); } else if(input[i] == ')' || input[i] == ']' || input[i] == '}') { if(isEmpty()) { printf("Invalid parantheses\n"); return 0; } char ch = pop(); if((input[i] == ')' && ch != '(') || (input[i] == ']' && ch != '[') || (input[i] == '}' && ch != '{')) { printf("Invalid parantheses\n"); return 0; } } } if(isEmpty()) { printf("Valid parantheses\n"); } else { printf("Invalid parantheses\n"); } return 0; }

Chichvarkin Saves Putin | Vitaly Portnikov

Fall asleep while I build a town (from nothing) - "Town To City" ASMR for sleep

Unit 3 | Lec 2 | Stacks using Linked List | Data Structures | C Programming

Lawrence Wilkerson: Iran-Krieg spitzt sich zur globalen Krise zu

Is this like Go for .NET? (G#)

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra

Rust Programming Full Course | Learn ⚙️ in 2024 | #rustprogramming #rust

Every Data Structure Simply Explained in 25 Minutes!

Creator of OCaml: Functional Programming, Formal Verification, Programming Languages | Xavier Leroy

Alexander Mercouris: NATO Will Soon Panic & Risk War with Russia

Unit 1 | Lec 1 | Linear Search in DS | Data Structures | C Programming | Applications of LS

Unit 3 | Lec 1 | Stacks Using Arrays | Data Structures | C Programming

Straight Talk # 215

Learn C# in Unity - Complete Course for Beginners

I hate Opus 5. It’s the best model, anyway.

System Design Explained: APIs, Databases, Caching, CDNs, Load Balancing & Production Infra

Only Video That Will Make You BETTER at MATH - 100%

Fil-C: Garbage In, Memory Safety Out! - Filip Pizlo | SSW 2026

What Nobody Tells You About Being a Quant

