You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contracts/solution-contract.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,6 +270,37 @@ class ClassName: # ← No blank line before class/function
270
270
- ❌ Redundant restating of code logic
271
271
- ❌ More than 4 bullet points
272
272
273
+
#### Dynamic Programming Solutions
274
+
275
+
For DP solutions, place the **State/Base case/Transition** definitions as **class-level comments** inside the class body, not in the block comment header.
| Inline comments | Brief markers like `# Base case`, `# Transition` near code |
301
+
302
+
**Rationale:** DP definitions are implementation details that belong close to the code. Block comments should focus on high-level algorithmic insights.
303
+
273
304
#### Internal Function Comments
274
305
275
306
Internal comments **within methods** are acceptable and encouraged for documenting:
0 commit comments