mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 13:12:44 +00:00
69 lines
4.8 KiB
XML
69 lines
4.8 KiB
XML
<svg viewBox="0 0 800 650" xmlns="http://www.w3.org/2000/svg">
|
|
<!-- Background (REQUIRED) - MUST BE FIRST ELEMENT -->
|
|
<rect width="800" height="650" fill="#f8f9fa" rx="10"/>
|
|
|
|
<!-- Title -->
|
|
<text x="80" y="40" font-family="Arial, sans-serif" font-size="28" font-weight="bold" fill="#2c3e50">Two Pointers Decision Rule</text>
|
|
|
|
<!-- Start -->
|
|
<rect x="300" y="80" width="200" height="60" fill="#ffffff" stroke="#3498db" stroke-width="2" rx="8"/>
|
|
<text x="340" y="115" font-family="Arial, sans-serif" font-size="18" font-weight="bold" fill="#2c3e50">New Problem</text>
|
|
<path d="M 400,140 L 400,160" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
|
|
<!-- Q1 -->
|
|
<rect x="175" y="160" width="450" height="70" fill="#ffffff" stroke="#3498db" stroke-width="2" rx="8"/>
|
|
<text x="210" y="185" font-family="Arial, sans-serif" font-size="16" fill="#2c3e50">Am I maintaining a contiguous interval?</text>
|
|
<text x="225" y="205" font-family="Arial, sans-serif" font-size="14" fill="#7f8c8d">(Subarray, substring, window property)</text>
|
|
|
|
<path d="M 625,195 L 675,195 L 675,225" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="640" y="190" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#27ae60">Yes</text>
|
|
<rect x="600" y="225" width="160" height="50" fill="#d1fae5" stroke="#10b981" stroke-width="2" rx="8"/>
|
|
<text x="615" y="255" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#2c3e50">Sliding Window</text>
|
|
|
|
<path d="M 400,230 L 400,265" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="410" y="245" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e74c3c">No</text>
|
|
|
|
<!-- Q2 -->
|
|
<rect x="175" y="265" width="450" height="70" fill="#ffffff" stroke="#3498db" stroke-width="2" rx="8"/>
|
|
<text x="225" y="290" font-family="Arial, sans-serif" font-size="16" fill="#2c3e50">Can I safely eliminate one side?</text>
|
|
<text x="250" y="310" font-family="Arial, sans-serif" font-size="14" fill="#7f8c8d">(Sorted, symmetric, bottleneck)</text>
|
|
|
|
<path d="M 625,300 L 675,300 L 675,330" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="640" y="295" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#27ae60">Yes</text>
|
|
<rect x="600" y="330" width="160" height="50" fill="#d1fae5" stroke="#10b981" stroke-width="2" rx="8"/>
|
|
<text x="615" y="360" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#2c3e50">Opposite Dir</text>
|
|
|
|
<path d="M 400,335 L 400,370" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="410" y="350" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e74c3c">No</text>
|
|
|
|
<!-- Q3 -->
|
|
<rect x="175" y="370" width="450" height="70" fill="#ffffff" stroke="#3498db" stroke-width="2" rx="8"/>
|
|
<text x="225" y="395" font-family="Arial, sans-serif" font-size="16" fill="#2c3e50">Am I rewriting or filtering in place?</text>
|
|
<text x="235" y="415" font-family="Arial, sans-serif" font-size="14" fill="#7f8c8d">(Remove dups, move zeros, partition)</text>
|
|
|
|
<path d="M 625,405 L 675,405 L 675,435" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="640" y="400" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#27ae60">Yes</text>
|
|
<rect x="600" y="435" width="160" height="50" fill="#d1fae5" stroke="#10b981" stroke-width="2" rx="8"/>
|
|
<text x="635" y="465" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#2c3e50">Same Dir</text>
|
|
|
|
<path d="M 400,440 L 400,475" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="410" y="455" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e74c3c">No</text>
|
|
|
|
<!-- Q4 -->
|
|
<rect x="175" y="475" width="450" height="70" fill="#ffffff" stroke="#3498db" stroke-width="2" rx="8"/>
|
|
<text x="210" y="500" font-family="Arial, sans-serif" font-size="16" fill="#2c3e50">Am I reasoning about relative position?</text>
|
|
<text x="250" y="520" font-family="Arial, sans-serif" font-size="14" fill="#7f8c8d">(Midpoint, cycle, fixed gap)</text>
|
|
|
|
<path d="M 625,510 L 675,510 L 675,540" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="640" y="505" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#27ae60">Yes</text>
|
|
<rect x="600" y="540" width="160" height="50" fill="#d1fae5" stroke="#10b981" stroke-width="2" rx="8"/>
|
|
<text x="625" y="570" font-family="Arial, sans-serif" font-size="16" font-weight="bold" fill="#2c3e50">Fast & Slow</text>
|
|
|
|
<path d="M 400,545 L 400,580" stroke="#dee2e6" stroke-width="2" fill="none"/>
|
|
<text x="410" y="560" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#e74c3c">No</text>
|
|
|
|
<!-- Default -->
|
|
<rect x="300" y="580" width="200" height="60" fill="#e5e7eb" stroke="#6b7280" stroke-width="2" rx="8"/>
|
|
<text x="325" y="615" font-family="Arial, sans-serif" font-size="16" fill="#2c3e50">Other Techniques</text>
|
|
</svg>
|