Skip to content

Instantly share code, notes, and snippets.

View cjsim89's full-sized avatar
πŸ³οΈβ€πŸŒˆ

Chris Simmons cjsim89

πŸ³οΈβ€πŸŒˆ
  • Turing School of Software & Design
  • Columbus, OH
  • 04:52 (UTC -04:00)
View GitHub Profile
@cjsim89
cjsim89 / openers_closers.md
Created December 6, 2023 18:05
Openers/closers technical interview question

Validating Openers/Closers

You're working with an intern that keeps coming to you with some code that won't run because the braces, brackets, and parentheses are off. To save you both some time, you decide to write a braces/brackets/parentheses validator.

Let's say that:

  • (, {, and [ are called "openers", and
  • ), }, and ] are called "closers".

Write an efficient method that tells us whether or not an input string's openers and closers are properly nested.