The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
1. Description
You are given an expression consisting of ()[]{}, check if the expression is a proper
bracketed sequence.
Input Format:
First line contains a integer N, followed by N test cases
Sample Format:
Print Yes or No for each test cases in a line.
Sample Input:
2
(([]))
([)]
Sample Output:
Yes
No
2. Description
Given a proper mathematical expression, output a fully bracketed expression.
Input Format:
First line contain integer N, followed by N test cases
Output Format:
Print the fully bracketed expression
Sample Input:
2
a+b-c
a+b*c-d
Sample Output:
((a+b)-c)
((a+(b*c))-d)
3. Description
You are given a string S and a pattern P. Find the number of times an anagram of P occurs
as a substring of S.
Input Format:
First line contain integer N, followed by N test case. Each test contain a string S followed by
a pattern P.
Output Format:
For each test case, Output the number of times an anagram of P occurs as a substring of S.
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll