Permalink
Find file
f1b07f8 Jul 3, 2016
45 lines (32 sloc) 626 Bytes

Correct brackets

Description

Write a JavaScript function to check if in a given expression the brackets are put correctly.

Input

  • The input will consist of an array containing a string

Output

  • The output should be consisted of one line
    • Correct or Incorrect

Constraints

  • Time limit: 0.2s
  • Memory limit: 16MB

Sample tests

Sample Test 1

Input

[ '((a+b)/5-d)' ]

Output

Correct

Sample Test 2

Input

[ ')(a+b))' ]

Output

Incorrect

Submission

  • Submit your code here