Skip to content

Latest commit

 

History

History

encloseInBrackets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Check Out My YouTube Channel

Algorithm Challenge Available At CodeFights

Given a string, enclose it in round brackets.

Example

For inputString = "abacaba", the output should be encloseInBrackets(inputString) = "(abacaba)".

Input/Output

  • [execution time limit] 5 seconds (ts)

  • [input] string inputString

Guaranteed constraints:

0 ≤ inputString.length ≤ 10

  • [output] string