Validate a bracket string
Company: Gofundme
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Technical Screen
## Problem
Given a string `s` consisting only of the characters `(`, `)`, `[`, `]`, `{`, `}`, determine whether the string is **valid**.
A string is valid if:
1. Every opening bracket has a corresponding closing bracket of the **same type**.
2. Brackets are closed in the **correct order** (proper nesting).
3. Every closing bracket matches the most recent unmatched opening bracket.
### Input
- A string `s` (length `0` to `100,000`).
- `s` contains only bracket characters.
### Output
- Return `true` if `s` is valid; otherwise return `false`.
### Examples
- `"()[]{}"` → `true`
- `"([{}])"` → `true`
- `"(]"` → `false`
- `"([)]"` → `false`
- `"(("` → `false`
Quick Answer: This question evaluates a candidate's ability to reason about paired-token matching and nested structure correctness in strings, measuring skills in parsing, correctness reasoning, and edge-case handling.