Problems — Level 9: Geometry & Coordinate Math¶
এই folder-এ Level 9-এর 12টা problem-এর note থাকবে। প্রতিটা problem-এর জন্য আলাদা একটা
.mdfile — সেখানে থাকবে নিজের ভাষায় problem বোঝা, হাতে আঁকা ছবির বর্ণনা, dry run, code, আর ভুল থেকে শেখা। Geometry-তে বিশেষ নিয়ম: ছবি না এঁকে code লেখা নিষেধ।
কীভাবে problem গুলো use করবে?¶
প্রতিটা problem-এর note লেখা হয় ../../../templates/math-problem-note-template.md follow করে — ২০টা section-এর একটা template, problem বোঝা থেকে brute force → optimization → dry run → complexity → "ভবিষ্যতের আমাকে এক লাইনে কী বলব" পর্যন্ত। Geometry-র জন্য বাড়তি অভ্যাস: dry run section-এ অন্তত একটা ASCII ছবি বা graph paper-এর ছবির বর্ণনা রাখো, আর edge case list-এ collinear / touching / duplicate point — এই তিনটা শব্দ খুঁজে দেখো প্রাসঙ্গিক কি না।
নিয়মটা সহজ:
- Table থেকে একটা problem নাও (recommended order ../README.md-তে আছে)
- আগে graph paper-এ ছোট একটা উদাহরণ আঁকো, তারপর খাতায় solve করার চেষ্টা — অন্তত 20-30 মিনিট
- তারপর note file বানাও/পড়ো, নিজের approach-এর সাথে মেলাও
- Solve হয়ে গেলে Status
plannedথেকেdoneকরে দাও
Tracker table¶
| # | Problem | Difficulty | Pattern | Inherits from | Source | Note file | Status |
|---|---|---|---|---|---|---|---|
| 113 | Distance Between Points | Easy | squared distance | — | Classic exercise | 113-distance-between-points.md | planned |
| 114 | Slope and Collinearity | Easy | cross multiply | 113 | Classic exercise | 114-slope-and-collinearity.md | planned |
| 115 | Area of Triangle | Easy | shoelace | 114 | Classic exercise | 115-area-of-triangle.md | planned |
| 116 | Orientation of Three Points | Medium | cross product sign | 115 | CP-Algorithms — https://cp-algorithms.com/geometry/oriented-triangle-area.html | 116-orientation-three-points.md | planned |
| 117 | Line Intersection Basic | Medium | orientation test | 116 | CP-Algorithms geometry — https://cp-algorithms.com/ | 117-line-intersection-basic.md | planned |
| 118 | Rectangle Overlap | Medium | interval logic | — | LeetCode — https://leetcode.com/problems/rectangle-overlap/ | 118-rectangle-overlap.md | planned |
| 119 | Circle and Point | Easy | r² compare | 113 | Classic exercise | 119-circle-and-point.md | planned |
| 120 | Convex Hull Intro | Hard | monotone chain | 116 | CP-Algorithms — https://cp-algorithms.com/geometry/convex-hull.html, CSES Convex Hull — https://cses.fi/problemset/task/2195 | 120-convex-hull-intro.md | planned |
| 121 | Manhattan Distance Tricks | Medium | 45° rotation | 113 | Classic CP trick | 121-manhattan-distance-tricks.md | planned |
| 122 | Rotate Matrix and Coordinates | Medium | coordinate map | — | LeetCode Rotate Image — https://leetcode.com/problems/rotate-image/ | 122-rotate-matrix-coordinates.md | planned |
| 123 | Grid Movement Math | Medium | parity reachability | 001 | Classic exercise | 123-grid-movement-math.md | planned |
| 124 | Pick's Theorem Intro | Hard | lattice counting | 115 | CP-Algorithms — https://cp-algorithms.com/geometry/picks-theorem.html | 124-picks-theorem-intro.md | planned |
"Inherits from" column-টা কী?¶
প্রতিটা problem আগের কোনো problem-এর কাঁধে দাঁড়িয়ে আছে। এই level-এ ধারাটা খুব পরিষ্কার — 113-এর squared distance থেকে 119 আর 121; 114-এর cross multiplication থেকে 115-এর shoelace; 115 থেকে 116-এর orientation; আর 116 থেকে 117 (intersection) আর 120 (convex hull)। 123 ফিরে যায় একদম level 0-এর parity-তে (problem 001)। আটকে গেলে শিকড়ে ফেরো।
113 (distance²) ──┬──▶ 119 (circle)
└──▶ 121 (Manhattan)
114 (cross mult) ──▶ 115 (shoelace) ──┬──▶ 116 (orientation) ──┬──▶ 117 (intersection)
│ └──▶ 120 (convex hull)
└──▶ 124 (Pick's theorem)
001 [level 0 parity] ──▶ 123 (grid parity)
স্বাধীন শাখা: 118 (interval logic) 122 (coordinate map)
একটা ছোট পরামর্শ¶
Geometry-র WA প্রায় কখনোই algorithm-এর ভুলে হয় না — হয় edge case-এ: তিনটা point এক লাইনে, segment-এর প্রান্ত ছুঁয়ে আছে, দুটো point একই জায়গায়, rectangle শুধু ধার শেয়ার করছে। তাই প্রতিটা note-এর edge case section-টা সবচেয়ে যত্নে লেখো। আর দ্বিতীয় পরামর্শ: পুরো level-এ float ছাড়া কোড লেখার চেষ্টা করো — পারলে বুঝবে integer geometry-র আসল স্বাদ পেয়ে গেছ।
Concept ঝালাই করতে হলে → ../concept-notes.md। ছবি এঁকে বুঝতে চাইলে → ../visualization-ideas.md।