Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

VER001-"Carbon Atom" Editorial

$
0
0

PROBLEM LINKScontest

DIFFICULTY Easy

PREREQUISITES concept of stack

PROBLEM STATEMENT Given an expression which contain carbon and hydrogen atoms your task is to find total no of carbon atoms in expression if expression is valid.

Quick Explanation According to bracket increase no. of carbon atoms if you find any time parenthesis is not balance break loop and print "INVALID".

EDITORIALIST'S SOLUTION here


Viewing all articles
Browse latest Browse all 39796

Trending Articles