एक विश्वसनीय रणनीति बुझ्नु, योजना गर्नु, त्यसपछि कोड गर्नु हो — सीधै टाइप गर्न कहिल्यै हतारो नगर्नुहोस्। एक संरचित दृष्टिकोणले किनारा अवस्थाहरु शीघ्र सनाक्त गर्छ र आपको सोच स्पष्टताका साथ संचार गर्छ।
चरण-दर-चरण ढाँचा
text
1. CLARIFY -> restate the problem, ask about inputs, ranges, edge cases
2. EXAMPLES -> work a small example by hand; note edge cases (empty, 1, dups)
3. BRUTE FORCE -> state the obvious solution and its complexity
4. OPTIMIZE -> spot the bottleneck; pick a pattern (hash, two-pointer, DP...)
5. CODE -> write clean, modular code while talking through it
6. TEST -> trace examples, check edges, fix bugs
7. ANALYZE -> state final time and space complexity
