Click4Ai

250.

Hard

### Dependency Parsing

**Example:** Given a sentence 'The dog chased the cat', return the dependency parse tree.

**Constraints:** The input sentence will have at most 100 tokens.

Test Cases

Test Case 1
Input: 'The dog chased the cat'
Expected: [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]
Test Case 2
Input: 'The cat slept'
Expected: [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
+ 3 hidden test cases