Skip to content

Commit a9cee92

Browse files
committed
updated as per your sugeestion
1 parent 5043238 commit a9cee92

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dsa-solutions/gfg-solutions/0022-lemonade-change.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ Since not every customer received the correct change, the answer is false.
5959
### Your Task
6060
You don't need to read input or print anything. Your task is to complete the function `lemonadeChange()` which takes the integer `N` and integer array `bills[]` as parameters and returns true if it is possible to provide change to every customer otherwise false.
6161

62-
**Expected Time Complexity:** O(N)
63-
**Expected Auxiliary Space:** O(1)
62+
**Expected Time Complexity:** $O(N)$
63+
**Expected Auxiliary Space:** $O(1)$
6464

6565
### Constraints
66-
- 1 ≤ N ≤ 10^5
67-
- bills[i] contains only {5, 10, 20}
66+
- $1 ≤ N ≤ 10^5$
67+
- $bills[i]$ contains only {5, 10, 20}
6868

6969
## Solution
7070

@@ -243,8 +243,8 @@ class Solution {
243243

244244
### Complexity Analysis
245245

246-
- **Time Complexity:** O(N), where N is the length of the bills array. We iterate through the array once.
247-
- **Space Complexity:** O(1), as we only use a constant amount of extra space for variables `five` and `ten`.
246+
- **Time Complexity:** $O(N)$, where N is the length of the bills array. We iterate through the array once.
247+
- **Space Complexity:** $O(1)$, as we only use a constant amount of extra space for variables `five` and `ten`.
248248

249249
---
250250

0 commit comments

Comments
 (0)