Skip to content

Commit fc8b922

Browse files
committed
del
1 parent 99778f9 commit fc8b922

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

src/chapters/combining-patterns/combine-patterns-four.jsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,27 +52,6 @@ lo=4, hi=4, mid=4: thicknesses[4]=7 < 8 (unsafe!) → result=4, hi=3
5252
lo=4, hi=3: lo > hi, stop
5353
5454
Result: 4 (first index where thickness < 8)
55-
\`\`\`
56-
57-
### 🔧 Implementation Template
58-
\`\`\`javascript
59-
function findFirstBelowThreshold(thicknesses, minSafe) {
60-
let lo = 0, hi = thicknesses.length - 1;
61-
let result = -1;
62-
63-
while (lo <= hi) {
64-
const mid = lo + Math.floor((hi - lo) / 2);
65-
if (thicknesses[mid] < minSafe) {
66-
result = mid; // Found candidate
67-
hi = mid - 1; // Look for earlier occurrence
68-
} else {
69-
lo = mid + 1; // Still safe, go right
70-
}
71-
}
72-
73-
return result;
74-
}
75-
\`\`\`
7655
7756
**Return Value**
7857
- Index of first unsafe section, or \`-1\` if all are safe

0 commit comments

Comments
 (0)