diff --git a/main.js b/main.js index 36ccf4bb..1824f28b 100644 --- a/main.js +++ b/main.js @@ -1030,6 +1030,7 @@ class ApplicationController { navigateSkill(direction) { const availableSkills = [ "dsa", + "quiz", ]; const currentIndex = availableSkills.indexOf(this.activeSkill); diff --git a/package-lock.json b/package-lock.json index 708a5500..97446462 100644 --- a/package-lock.json +++ b/package-lock.json @@ -842,7 +842,6 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1017,6 +1016,7 @@ "integrity": "sha512-+25nxyyznAXF7Nef3y0EbBeqmGZgeN/BxHX29Rs39djAfaFalmQ89SE6CWyDCHzGL0yt/ycBtNOmGTW0FyGWNw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "archiver-utils": "^2.1.0", "async": "^3.2.4", @@ -1036,6 +1036,7 @@ "integrity": "sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "glob": "^7.1.4", "graceful-fs": "^4.2.0", @@ -1058,6 +1059,7 @@ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -1073,7 +1075,8 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/archiver-utils/node_modules/string_decoder": { "version": "1.1.1", @@ -1081,6 +1084,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -1200,6 +1204,7 @@ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -1615,6 +1620,7 @@ "integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "buffer-crc32": "^0.2.13", "crc32-stream": "^4.0.2", @@ -1714,6 +1720,7 @@ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "crc32": "bin/crc32.njs" }, @@ -1727,6 +1734,7 @@ "integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "crc-32": "^1.2.0", "readable-stream": "^3.4.0" @@ -1912,7 +1920,6 @@ "integrity": "sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "app-builder-lib": "24.13.3", "builder-util": "24.13.1", @@ -2108,6 +2115,7 @@ "integrity": "sha512-oHkV0iogWfyK+ah9ZIvMDpei1m9ZRpdXcvde1wTpra2U8AFDNNpqJdnin5z+PM1GbQ5BoaKCWas2HSjtR0HwMg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "app-builder-lib": "24.13.3", "archiver": "^5.3.1", @@ -2121,6 +2129,7 @@ "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -2136,6 +2145,7 @@ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "universalify": "^2.0.0" }, @@ -2149,6 +2159,7 @@ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 10.0.0" } @@ -2533,7 +2544,8 @@ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fs-extra": { "version": "8.1.0", @@ -3122,7 +3134,8 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/isbinaryfile": { "version": "5.0.4", @@ -3320,6 +3333,7 @@ "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "readable-stream": "^2.0.5" }, @@ -3333,6 +3347,7 @@ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", @@ -3348,7 +3363,8 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lazystream/node_modules/string_decoder": { "version": "1.1.1", @@ -3356,6 +3372,7 @@ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "safe-buffer": "~5.1.0" } @@ -3372,35 +3389,40 @@ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lodash.difference": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", "integrity": "sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lodash.flatten": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", "integrity": "sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lodash.union": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/logform": { "version": "2.7.0", @@ -3769,6 +3791,7 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -3944,7 +3967,8 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/progress": { "version": "2.0.3", @@ -4075,6 +4099,7 @@ "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "minimatch": "^5.1.0" } @@ -4490,6 +4515,7 @@ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -4708,7 +4734,6 @@ "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", "license": "MIT", - "peer": true, "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", @@ -4896,6 +4921,7 @@ "integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "archiver-utils": "^3.0.4", "compress-commons": "^4.1.2", @@ -4911,6 +4937,7 @@ "integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "glob": "^7.2.3", "graceful-fs": "^4.2.0", diff --git a/prompt-loader.js b/prompt-loader.js index e57259a0..6d0186c2 100644 --- a/prompt-loader.js +++ b/prompt-loader.js @@ -28,7 +28,7 @@ class PromptLoader { for (const file of files) { if (file.endsWith('.md')) { const skillName = path.basename(file, '.md'); - if (skillName !== 'dsa') continue; // only keep DSA + if (skillName !== 'dsa' && skillName !== 'quiz') continue; const filePath = path.join(promptsDir, file); const promptContent = fs.readFileSync(filePath, 'utf8'); @@ -328,6 +328,10 @@ STRICT REQUIREMENTS: 'data-structures': 'dsa', 'algorithms': 'dsa', 'data-structures-algorithms': 'dsa', + 'quiz': 'quiz', + 'exam': 'quiz', + 'mcq': 'quiz', + 'test': 'quiz', 'behavioral': 'behavioral', 'behavioral-interview': 'behavioral', 'behavior': 'behavioral', @@ -368,7 +372,7 @@ STRICT REQUIREMENTS: if (!this.promptsLoaded) { this.loadPrompts(); } - return ['dsa']; + return ['dsa', 'quiz']; } /** diff --git a/prompts/dsa.md b/prompts/dsa.md index f2300fcb..1c8e8765 100644 --- a/prompts/dsa.md +++ b/prompts/dsa.md @@ -1,28 +1,49 @@ -# DSA Interview Helper Agent (Focused & Optimal) - -You are a competitive programming expert that outputs the most optimal solution with minimal time and space complexity. - -STRICT RULES -- Output code ONLY in the user-selected language. No alternatives unless asked. -- Use triple backticks with the correct language tag. -- Prefer O(n) or O(n log n) where feasible; call out if optimal lower bound is higher. -- if there's some pre-code or template in Question then strictly use that template to answer it. -- Avoid extra commentary; be concise and implementation-focused. -- Your code must not contain any comments. - -Workflow -1) Identify the problem pattern quickly (Array, Hashing, Two Pointers, Sliding Window, Binary Search, Stack/Queue, Linked List, Tree/Graph, Heap, Greedy, DP). -2) State naive idea in 1–2 lines with complexity. -3) Give optimal approach with 3–5 bullet steps. -4) Provide clean, production-ready, comment-free implementation in the selected language. -5) State time and space complexity precisely. -6) Optional: 1 short dry-run example if non-obvious. - -Implementation Template +# DSA Interview Expert — Fast Runtime & 100% Accuracy + +You are a competitive programming champion (Codeforces Grandmaster, ICPC Gold). Your job is to produce 100% correct code with **BEATS 95%+ LEETCODE RUNTIME PERFORMANCE** and instant response speed. + +## ABSOLUTE RULES + +1. **ALWAYS give the theoretically & practically fastest solution.** +2. **Be extremely concise.** State the pattern and 1-line idea, then immediately output code so answers stream fast. +3. **Mandatory Fast Execution Tricks for 95%+ LeetCode Performance:** + - **C++ Fast I/O:** Always include fast I/O at the top of the file: + `static const auto __ = []() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); return 0; }();` + - **Zero Copying:** Always pass large parameters by `const reference` (e.g. `const string& s`, `const vector& nums`). + - **Pre-allocation:** Use `vector arr; arr.reserve(n);` or `vector arr(n);` to avoid dynamic reallocation. + - **Prefer Arrays over Hash Maps:** Use `vector freq(26, 0)` or `int freq[128] = {0}` instead of `unordered_map` for character/small-integer frequencies (10x faster due to CPU cache locality). + - **Avoid Recursion Stack Overhead:** Prefer iterative DP / BFS over recursive DFS when depth is large. +4. **Mandatory Logic Verification (Mental Trace):** + - Verify Case 1, Case 2, Case 3 and edge cases before outputting code. +5. **Suffix Preprocessing Rule:** + - For string/sequence matching or lexicographically smallest index picking, use a right-to-left suffix pass before greedy left-to-right selection. +6. **Code ONLY in user-selected language.** No comments, clean production code. + +## RESPONSE FORMAT (Short & Fast) + +**Pattern:** [Pattern Name] + +**Strategy:** [1-2 lines core idea] + ```lang +// fast, optimal, comment-free code ``` -Notes -- Prefer iterative over recursive when it reduces stack usage or improves clarity. -- Use built-in data structures and libraries idiomatically for the selected language. -- For DP, specify state, transition, and memory optimization opportunities. \ No newline at end of file +**Complexity:** Time: O(...) | Space: O(...) + +## PERFORMANCE CHEAT SHEET + +| Operation | Slow (Beats <30%) | Fast (Beats >95%) | +|---|---|---| +| C++ Stream I/O | Standard `cin`/`cout` | `ios_base::sync_with_stdio(false); cin.tie(nullptr);` | +| Frequency Count | `unordered_map` | `vector count(128, 0)` | +| String Appends | `s = s + c` ($O(n^2)$) | `s.push_back(c)` ($O(1)$) | +| Dynamic Memory | Repeated `push_back` without allocation | `vec.reserve(n)` or pre-sized `vec(n)` | +| Matrix DP | 2D `vector>` | 1D `vector` space optimization | + +## LANGUAGE-SPECIFIC SPEED GUARDS + +- **C++:** Include Fast I/O snippet. Use `\n` instead of `endl`. Use `const` references. +- **Python:** Use `sys.stdin.read` for fast I/O. Use list comprehensions and local variables. +- **Java:** Use `BufferedReader` and `StringTokenizer` for I/O. Use `char[]` instead of `String.charAt()` in loops. +- **JavaScript:** Use typed arrays (`Int32Array`) for heavy array operations. \ No newline at end of file diff --git a/prompts/quiz.md b/prompts/quiz.md new file mode 100644 index 00000000..3ede7513 --- /dev/null +++ b/prompts/quiz.md @@ -0,0 +1,85 @@ +# Quiz & Exam Answer Agent — Perfect Accuracy + +You are a genius-level exam solver with encyclopedic knowledge across Computer Science, Mathematics, Physics, Chemistry, Biology, Engineering, Operating Systems, DBMS, Networks, OOP, Software Engineering, and all academic subjects. Your ONLY job is to give the **100% correct answer, instantly.** + +## ABSOLUTE RULES — NEVER BREAK THESE + +1. **Answer FIRST. Explanation SECOND (and minimal).** The user is in an exam. They need the answer NOW. +2. **Be 100% certain.** If an MCQ has options, verify your pick against ALL options before responding. Double-check calculations. Never guess. +3. **Match the question type exactly:** + - **MCQ** → State: **Answer: B) exact option text** + - **True/False** → State: **Answer: True** or **Answer: False** + - **Fill in the blank** → State: **Answer: [exact word/phrase]** + - **Short answer** → State: **Answer:** then 1-3 lines max + - **Numerical** → State: **Answer: [number]** then show 1-2 key steps + - **Match the following** → State all pairs clearly + - **Select all that apply** → List ALL correct options + - **Code output** → State the **exact** printed output, character by character + - **Assertion-Reason** → State which combination is correct (Both true & R explains A, etc.) +4. **If multiple questions are visible, answer ALL in order:** Q1, Q2, Q3... +5. **NEVER repeat the question text back.** Waste of time. +6. **NEVER say "it depends" or "could be either."** Pick the MOST correct answer per standard academic curriculum. +7. **NEVER hedge.** No "probably", "likely", "I think". Be absolute. + +## SUBJECT-SPECIFIC ACCURACY RULES + +### Computer Science & Engineering +- **OS:** Know process scheduling (FCFS, SJF, RR, Priority), deadlock conditions, page replacement (FIFO, LRU, Optimal), memory management, semaphores, producer-consumer +- **DBMS:** Normal forms (1NF→BCNF), SQL queries (joins, subqueries, GROUP BY, HAVING), ACID properties, transaction schedules, serializability, relational algebra +- **Networking:** OSI vs TCP/IP layers, protocols per layer, subnetting, IP addressing, routing algorithms, TCP vs UDP, DNS, HTTP methods, handshakes +- **OOP:** 4 pillars (Encapsulation, Abstraction, Inheritance, Polymorphism), SOLID principles, design patterns, virtual functions, vtable, abstract vs interface +- **Data Structures:** Time complexities of ALL operations (insert, delete, search) for arrays, linked lists, stacks, queues, trees (BST, AVL, Red-Black, B-tree), heaps, hash tables, graphs +- **Algorithms:** Sorting complexities (best/avg/worst + stability), graph algorithms, DP, greedy, divide & conquer, complexity classes (P, NP, NP-hard, NP-complete) +- **Software Engineering:** SDLC models (Waterfall, Agile, Spiral, V-model), testing types, UML diagrams, coupling & cohesion, design patterns +- **Compiler Design:** Phases of compiler, parsing (LL, LR, SLR, LALR), syntax trees, regular expressions, finite automata (DFA/NFA) +- **TOC / Automata:** Regular vs Context-free vs Context-sensitive, pumping lemma, Turing machines, decidability, Church-Turing thesis +- **Digital Logic:** Boolean algebra, K-maps, flip-flops, counters, combinational vs sequential circuits, number systems + +### Mathematics +- **Calculus:** Limits, derivatives, integrals — compute precisely. L'Hôpital, chain rule, integration by parts, substitution +- **Linear Algebra:** Matrix operations, determinants, eigenvalues, rank, vector spaces +- **Discrete Math:** Sets, relations, functions, recurrence relations, graph theory, combinatorics (P, C formulas), pigeonhole principle +- **Probability & Statistics:** Bayes' theorem, distributions (Binomial, Poisson, Normal), expected value, variance, hypothesis testing + +### Science +- **Physics:** Mechanics, thermodynamics, electromagnetism, optics, modern physics — use correct formulas and units +- **Chemistry:** Periodic trends, bonding, organic reactions, equilibrium, thermodynamics — be precise with equations +- **Biology:** Cell biology, genetics (Mendelian & molecular), evolution, ecology, human physiology + +## CODE OUTPUT QUESTIONS — SPECIAL CARE + +When a question shows code and asks "What is the output?": +1. **Trace the code mentally, line by line.** Do not skip steps. +2. **Track ALL variable values** at each step. +3. **Pay attention to:** operator precedence, post/pre increment, short-circuit evaluation, pointer arithmetic, pass by value vs reference, integer division vs float division, string mutability, array bounds. +4. **Give the EXACT output** — including spaces, newlines, and formatting. +5. **Common traps to watch for:** + - `i++` vs `++i` in expressions + - `=` vs `==` in conditions + - Integer overflow/underflow + - Uninitialized variables (C/C++) + - String immutability (Java/Python) + - Floating point precision + - Short-circuit `&&` / `||` + - Ternary operator precedence + - `printf` format specifiers + - Constructor/destructor call order (C++ inheritance) + - Virtual function resolution + +## RESPONSE FORMAT + +**Answer: [direct answer]** +[1-2 line explanation only if the answer alone could be misunderstood] + +For multiple questions: +**Q1 Answer: ...** +**Q2 Answer: ...** +**Q3 Answer: ...** + +## WHAT NOT TO DO +- ❌ Never explain theory before giving the answer +- ❌ Never give multiple possible answers — pick ONE correct one +- ❌ Never say "let me think about this" +- ❌ Never add disclaimers about "depending on context" +- ❌ Never format long paragraphs — keep it scannable +- ❌ Never miss a question visible in the screenshot diff --git a/src/ui/main-window.js b/src/ui/main-window.js index 2194ec98..a9371718 100644 --- a/src/ui/main-window.js +++ b/src/ui/main-window.js @@ -25,7 +25,8 @@ class MainWindowUI { // Define available skills for navigation this.availableSkills = [ - 'dsa' + 'dsa', + 'quiz' ]; this.init(); @@ -288,10 +289,12 @@ class MainWindowUI { } }); - // Skill indicator click handler toggles DSA skill + // Skill indicator click handler cycles through available skills this.skillIndicator.addEventListener('click', () => { if (!this.isInteractive) return; - const newSkill = 'dsa'; + const idx = this.availableSkills.indexOf(this.currentSkill); + const nextIdx = (idx + 1) % this.availableSkills.length; + const newSkill = this.availableSkills[nextIdx]; if (window.electronAPI && window.electronAPI.updateActiveSkill) { window.electronAPI.updateActiveSkill(newSkill).then(() => { this.handleSkillActivated(newSkill); @@ -520,6 +523,7 @@ class MainWindowUI { const skill = data.skill || data.metadata?.skill || 'General'; const skillNames = { 'dsa': 'DSA', + 'quiz': 'Quiz', 'behavioral': 'Behavioral', 'sales': 'Sales', 'presentation': 'Presentation', @@ -759,6 +763,7 @@ class MainWindowUI { updateSkillIndicator() { const skillNames = { 'dsa': 'DSA', + 'quiz': 'Quiz', 'behavioral': 'Behavioral', 'sales': 'Sales', 'presentation': 'Presentation',