messages
listlengths
2
2
[ { "role": "user", "content": "Refactor this Rust code for palindrome check: callback pyramid" }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // palindrome check in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Create a minimal SQL API handler for binary search." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Write unit tests in Bash for rate limiter." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Optimize this C++ approach for LRU cache." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // LRU cache in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Parse and validate JWT verification in Python." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"JWT verification in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Write a JavaScript function for CSV parsing." }, { "role": "assistant", "content": "function solve(input) {\n // CSV parsing in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Fix this TypeScript snippet for JSON schema validation: wrong boundary condition" }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // JSON schema validation in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this Go code for pagination: long function doing multiple things" }, { "role": "assistant", "content": "func Solve(input string) string {\n // pagination in Go\n return input\n}" } ]
[ { "role": "user", "content": "Create a minimal Rust API handler for retry with backoff." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // retry with backoff in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Write unit tests in SQL for debounce utility." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Optimize this Bash approach for file upload validation." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Parse and validate date range overlap in C++." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // date range overlap in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Write a Python function for top-k elements." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"top-k elements in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Fix this JavaScript snippet for two-sum: missing error handling" }, { "role": "assistant", "content": "function solve(input) {\n // two-sum in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this TypeScript code for merge intervals: loop with repeated condition checks" }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // merge intervals in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal Go API handler for deduplicate preserving order." }, { "role": "assistant", "content": "func Solve(input string) string {\n // deduplicate preserving order in Go\n return input\n}" } ]
[ { "role": "user", "content": "Write unit tests in Rust for slug generation." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // slug generation in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Optimize this SQL approach for email validation." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Parse and validate URL normalization in Bash." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Write a C++ function for RBAC permission check." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // RBAC permission check in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Fix this Python snippet for webhook signature check: off-by-one index error" }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"webhook signature check in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Refactor this JavaScript code for rolling average: nested if-else chain" }, { "role": "assistant", "content": "function solve(input) {\n // rolling average in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal TypeScript API handler for moving window max." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // moving window max in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write unit tests in Go for fibonacci memoization." }, { "role": "assistant", "content": "func Solve(input string) string {\n // fibonacci memoization in Go\n return input\n}" } ]
[ { "role": "user", "content": "Optimize this Rust approach for command-line args parsing." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // command-line args parsing in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Parse and validate palindrome check in SQL." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Write a Bash function for binary search." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Fix this C++ snippet for rate limiter: null/None access" }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // rate limiter in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this Python code for LRU cache: duplicated parsing logic" }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"LRU cache in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Create a minimal JavaScript API handler for JWT verification." }, { "role": "assistant", "content": "function solve(input) {\n // JWT verification in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write unit tests in TypeScript for CSV parsing." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // CSV parsing in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Optimize this Go approach for JSON schema validation." }, { "role": "assistant", "content": "func Solve(input string) string {\n // JSON schema validation in Go\n return input\n}" } ]
[ { "role": "user", "content": "Parse and validate pagination in Rust." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // pagination in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Write a SQL function for retry with backoff." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Fix this Bash snippet for debounce utility: incorrect async await usage" }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Refactor this C++ code for file upload validation: manual string concatenation in loop" }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // file upload validation in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal Python API handler for date range overlap." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"date range overlap in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Write unit tests in JavaScript for top-k elements." }, { "role": "assistant", "content": "function solve(input) {\n // top-k elements in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Optimize this TypeScript approach for two-sum." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // two-sum in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Parse and validate merge intervals in Go." }, { "role": "assistant", "content": "func Solve(input string) string {\n // merge intervals in Go\n return input\n}" } ]
[ { "role": "user", "content": "Write a Rust function for deduplicate preserving order." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // deduplicate preserving order in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Fix this SQL snippet for slug generation: mutation of shared state" }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Refactor this Bash code for email validation: callback pyramid" }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Create a minimal C++ API handler for URL normalization." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // URL normalization in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Write unit tests in Python for RBAC permission check." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"RBAC permission check in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Optimize this JavaScript approach for webhook signature check." }, { "role": "assistant", "content": "function solve(input) {\n // webhook signature check in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Parse and validate rolling average in TypeScript." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // rolling average in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write a Go function for moving window max." }, { "role": "assistant", "content": "func Solve(input string) string {\n // moving window max in Go\n return input\n}" } ]
[ { "role": "user", "content": "Fix this Rust snippet for fibonacci memoization: wrong boundary condition" }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // fibonacci memoization in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Refactor this SQL code for command-line args parsing: long function doing multiple things" }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Create a minimal Bash API handler for palindrome check." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Write unit tests in C++ for binary search." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // binary search in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Optimize this Python approach for rate limiter." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"rate limiter in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Parse and validate LRU cache in JavaScript." }, { "role": "assistant", "content": "function solve(input) {\n // LRU cache in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write a TypeScript function for JWT verification." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // JWT verification in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Fix this Go snippet for CSV parsing: missing error handling" }, { "role": "assistant", "content": "func Solve(input string) string {\n // CSV parsing in Go\n return input\n}" } ]
[ { "role": "user", "content": "Refactor this Rust code for JSON schema validation: loop with repeated condition checks" }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // JSON schema validation in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Create a minimal SQL API handler for pagination." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Write unit tests in Bash for retry with backoff." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Optimize this C++ approach for debounce utility." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // debounce utility in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Parse and validate file upload validation in Python." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"file upload validation in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Write a JavaScript function for date range overlap." }, { "role": "assistant", "content": "function solve(input) {\n // date range overlap in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Fix this TypeScript snippet for top-k elements: off-by-one index error" }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // top-k elements in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this Go code for two-sum: nested if-else chain" }, { "role": "assistant", "content": "func Solve(input string) string {\n // two-sum in Go\n return input\n}" } ]
[ { "role": "user", "content": "Create a minimal Rust API handler for merge intervals." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // merge intervals in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Write unit tests in SQL for deduplicate preserving order." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Optimize this Bash approach for slug generation." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Parse and validate email validation in C++." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // email validation in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Write a Python function for URL normalization." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"URL normalization in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Fix this JavaScript snippet for RBAC permission check: null/None access" }, { "role": "assistant", "content": "function solve(input) {\n // RBAC permission check in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this TypeScript code for webhook signature check: duplicated parsing logic" }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // webhook signature check in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal Go API handler for rolling average." }, { "role": "assistant", "content": "func Solve(input string) string {\n // rolling average in Go\n return input\n}" } ]
[ { "role": "user", "content": "Write unit tests in Rust for moving window max." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // moving window max in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Optimize this SQL approach for fibonacci memoization." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Parse and validate command-line args parsing in Bash." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Write a C++ function for palindrome check." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // palindrome check in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Fix this Python snippet for binary search: incorrect async await usage" }, { "role": "assistant", "content": "def binary_search(arr, target):\n lo, hi = 0, len(arr) - 1\n while lo <= hi:\n mid = (lo + hi) // 2\n if arr[mid] == target:\n ...
[ { "role": "user", "content": "Refactor this JavaScript code for rate limiter: manual string concatenation in loop" }, { "role": "assistant", "content": "function solve(input) {\n // rate limiter in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal TypeScript API handler for LRU cache." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // LRU cache in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write unit tests in Go for JWT verification." }, { "role": "assistant", "content": "func Solve(input string) string {\n // JWT verification in Go\n return input\n}" } ]
[ { "role": "user", "content": "Optimize this Rust approach for CSV parsing." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // CSV parsing in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Parse and validate JSON schema validation in SQL." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Write a Bash function for pagination." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Fix this C++ snippet for retry with backoff: mutation of shared state" }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // retry with backoff in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Refactor this Python code for debounce utility: callback pyramid" }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"debounce utility in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Create a minimal JavaScript API handler for file upload validation." }, { "role": "assistant", "content": "function solve(input) {\n // file upload validation in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Write unit tests in TypeScript for date range overlap." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // date range overlap in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Optimize this Go approach for top-k elements." }, { "role": "assistant", "content": "func Solve(input string) string {\n // top-k elements in Go\n return input\n}" } ]
[ { "role": "user", "content": "Parse and validate two-sum in Rust." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // two-sum in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Write a SQL function for merge intervals." }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Fix this Bash snippet for deduplicate preserving order: wrong boundary condition" }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Refactor this C++ code for slug generation: long function doing multiple things" }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // slug generation in C++\n return input;\n}" } ]
[ { "role": "user", "content": "Create a minimal Python API handler for email validation." }, { "role": "assistant", "content": "def solve(input_value):\n \"\"\"email validation in Python.\"\"\"\n return input_value" } ]
[ { "role": "user", "content": "Write unit tests in JavaScript for URL normalization." }, { "role": "assistant", "content": "function solve(input) {\n // URL normalization in JavaScript\n return input;\n}" } ]
[ { "role": "user", "content": "Optimize this TypeScript approach for RBAC permission check." }, { "role": "assistant", "content": "export function solve(input: unknown): unknown {\n // RBAC permission check in TypeScript\n return input;\n}" } ]
[ { "role": "user", "content": "Parse and validate webhook signature check in Go." }, { "role": "assistant", "content": "func Solve(input string) string {\n // webhook signature check in Go\n return input\n}" } ]
[ { "role": "user", "content": "Write a Rust function for rolling average." }, { "role": "assistant", "content": "pub fn solve(input: &str) -> String {\n // rolling average in Rust\n input.to_string()\n}" } ]
[ { "role": "user", "content": "Fix this SQL snippet for moving window max: missing error handling" }, { "role": "assistant", "content": "SELECT id, name\nFROM items\nORDER BY id DESC\nLIMIT 10;" } ]
[ { "role": "user", "content": "Refactor this Bash code for fibonacci memoization: loop with repeated condition checks" }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\"" } ]
[ { "role": "user", "content": "Create a minimal C++ API handler for command-line args parsing." }, { "role": "assistant", "content": "#include <string>\nstd::string solve(const std::string& input) {\n // command-line args parsing in C++\n return input;\n}" } ]