Tracks
/
Rust
Rust
/
Exercises
/
Matching Brackets
Matching Brackets

Matching Brackets

Easy

Instructions

Given a string containing brackets [], braces {}, parentheses (), or any combination thereof, verify that any and all pairs are matched and nested correctly. The string may also contain other characters, which for the purposes of this exercise should be ignored.


Source

Ginna Baker
Edit via GitHub The link opens in a new window or tab
Rust Exercism

Ready to start Matching Brackets?

Sign up to Exercism to learn and master Rust with 98 exercises, and real human mentoring, all for free.