Skip to content

Commit 543b12d

Browse files
authored
Update 1534-Count-good-triplets.md
1 parent fa5869e commit 543b12d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

dsa-solutions/lc-solutions/1500-1599/1534-Count-good-triplets.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ In this page, we will solve the Count Good Triplets problem using multiple appro
1919

2020
Given an array of integers `arr`, and three integers `a`, `b`, and `c`. You need to find the number of good triplets.
2121

22-
A triplet `(arr[i], arr[j], arr[k])` is good if the following conditions are true:
22+
A triplet $(arr[i], arr[j], arr[k])$ is good if the following conditions are true:
2323

24-
- `0 <= i < j < k < arr.length`
25-
- `|arr[i] - arr[j]| <= a`
26-
- `|arr[j] - arr[k]| <= b`
27-
- `|arr[i] - arr[k]| <= c`
24+
- $0 <= i < j < k < arr.length$
25+
- $|arr[i] - arr[j]| <= a$
26+
- $|arr[j] - arr[k]| <= b$
27+
- $|arr[i] - arr[k]| <= c$
2828

29-
Where `|x|` denotes the absolute value of `x`.
29+
Where $|x|$ denotes the absolute value of `x`.
3030

3131
Return the number of good triplets.
3232

@@ -50,9 +50,9 @@ Explanation: No triplet satisfies all conditions.
5050

5151
### Constraints
5252

53-
- `3 <= arr.length <= 100`
54-
- `0 <= arr[i] <= 1000`
55-
- `0 <= a, b, c <= 1000`
53+
- $3 <= arr.length <= 100$
54+
- $0 <= arr[i] <= 1000$
55+
- $0 <= a, b, c <= 1000$
5656

5757
---
5858

@@ -400,5 +400,5 @@ By using these approaches, we can efficiently solve the Count Good Triplets prob
400400
- **Solution Link:** [Count Good Triplets Solution on LeetCode](https://leetcode.com/problems/count-good-triplets/discuss/762344/Brute-Force-O(n3)-with-JavaC%2B%2B)
401401
- **Authors LeetCode Profile:** [Manish Kumar Gupta](https://leetcode.com/_manishh12/)
402402

403-
---
403+
404404

0 commit comments

Comments
 (0)