Skip to content

Commit 681cf36

Browse files
committed
Fix demo function by initializing nums and ensure newline at end of file
1 parent ecf9568 commit 681cf36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interview_workbook/leetcode/sliding_window/subarray_product_less_than_k.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"""
66

77
from src.interview_workbook.leetcode._registry import register_problem
8-
from src/interview_workbook.leetcode._types import Category, Difficulty
8+
from src.interview_workbook.leetcode._types import Category, Difficulty
99

1010

1111
class Solution:
@@ -28,7 +28,7 @@ def solve(self, *args):
2828

2929
def demo():
3030
"""Run a simple demonstration for Subarray Product Less Than K."""
31-
nums = [10, 5, 2, 6]
31+
nums =
3232
k = 100
3333
result = Solution().solve(nums, k)
3434
return f"Input: nums={nums}, k={k} -> Count of subarrays: {result}"
@@ -43,4 +43,4 @@ def demo():
4343
tags=["array", "sliding window"],
4444
url="https://leetcode.com/problems/subarray-product-less-than-k/",
4545
notes="Two-pointer sliding window. Expand right, shrink left until product < k."
46-
)
46+
)

0 commit comments

Comments
 (0)