Question: CHOOSE ONE OF QUESTION 4B (Basic) or 4X (Complex); Palindrome is a simpler function to implement than Counting Sort. Q-4B:Write a program that reverses characters

CHOOSE ONE OF QUESTION 4B (Basic) or 4X (Complex); Palindrome is a simpler function to implement than Counting Sort.

Q-4B:Write a program that reverses characters found inside a set of parentheses and removes the parentheses characters:20 points

reverse_parentheses(test) = test

reverse_parentheses((test) = tset

reverse_parentheses(left(test)right = lefttsetright

reverse_parentheses(left((test))right = lefttestright

reverse_parentheses(first(second(third))fourth) = firstthirddnocesfourth

reverse_parentheses(((not_reversed)) = not_reversed

Assume parenthesis will always be balanced. Paste completed programs here.Use only standard libraries and data structures.

Q-4X:Implement the counting sort algorithm, write complete programs to solve the following datasets inAscendingorder. You need to paste your complete programs here.20 points

Use only standard libraries and data structures.

  1. A [7, 7, 3, 6, 3, 10, 1, 5, 7, 20]
  1. A [7, 7, 3, 6, 3, 10, 1, 5, 7, 4400]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!