Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 687cbcf

Browse files
Refactor Solution class: add time and space complexity comments; remove unused factorialIterative method
1 parent 45caac1 commit 687cbcf

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎leetcode/713.subarray_product_less_than_k.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ void main() {
1212

1313
class Solution {
1414
////! Done: Solved the problem
15+
/// TC: O(n) SC: O(1)
1516
int numSubarrayProductLessThanK(List<int> nums, int k) {
1617
/// Check if empty Array
1718
if (nums.isEmpty) {
@@ -57,14 +58,6 @@ class Solution {
5758

5859
return subArraysCount;
5960
}
60-
61-
int factorialIterative(int n) {
62-
int result = 1;
63-
for (int i = 1; i <= n; i++) {
64-
result *= i;
65-
}
66-
return result;
67-
}
6861
}
6962

7063
void runTests() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /