1.2 Problem Template

1.2.1 Problem Metadata

1.2.2 Description

[Problem statement - describe what needs to be solved]

1.2.3 Examples

Example 1:

Input: [input]
Output: [output]
Explanation: [why]

1.2.4 Constraints

  • [List constraints from problem]

1.2.5 Solution

1.2.5.1 Walkthrough

[Explain the approach and thought process]

1.2.5.2 Analysis

  • Time Complexity: O(?)
  • Space Complexity: O(?)

1.2.5.3 Implementation Steps

  1. Step 1
  2. Step 2
  3. Step 3

1.2.5.4 Code - Java

public class Solution {
    public ReturnType methodName(InputType input) {
        // Implementation
    }
}