Zigzag Conversion

In the Zigzag Conversion problem, we have given a string s of length n and an integer r representing the number of rows. Convert the given string in the zigzag pattern of r rows and concatenate the characters row-wise. Print the new concatenated string. Example Input :  s = “TutorialCup” …

Read more

Check if Two Expressions With Brackets are Same

Given two strings s1 and s2 representing expressions containing addition operator, subtraction operator, lowercase alphabets, and parenthesis. Check if two expressions with brackets are the same. Example Input  s1 = “-(a+b+c)” s2 = “-a-b-c” Output  Yes Input  s1 = “a-b-(c-d)” s2 = “a-b-c-d” Output No Algorithm to Check if Two …

Read more

Translate »