messages listlengths 2 2 |
|---|
[
{
"role": "user",
"content": "Refactor Bash logic for two-sum to improve readability and performance. Difficulty: hard. Context: for an internal library. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""... |
[
{
"role": "user",
"content": "Write a Rust function for sliding window maximum. Difficulty: easy. Context: for an internal library. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // sliding window maximum in Rust\n input.to_stri... |
[
{
"role": "user",
"content": "Write unit tests in TypeScript for binary search. Difficulty: hard. Context: for a coding challenge platform. Include input validation."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // binary search in Ty... |
[
{
"role": "user",
"content": "Write unit tests in JavaScript for pagination helper. Difficulty: easy. Context: for a coding challenge platform. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // pagination helper in JavaScript\n if (input == null) re... |
[
{
"role": "user",
"content": "Write a TypeScript function for rate limiter. Difficulty: hard. Context: for an internal library. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // rate limiter in TypeScript\n if (in... |
[
{
"role": "user",
"content": "Refactor Bash logic for CSV parsing to improve readability and performance. Difficulty: hard. Context: for a backend service. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\... |
[
{
"role": "user",
"content": "Implement CSV parsing in JavaScript with edge-case handling. Difficulty: medium. Context: for a coding challenge platform. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // CSV parsing in JavaScript\n if (input == null) ... |
[
{
"role": "user",
"content": "Write unit tests in JavaScript for pagination helper. Difficulty: hard. Context: for a CLI utility. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // pagination helper in JavaScript\n if (input == null) return null;\n ... |
[
{
"role": "user",
"content": "Implement email validation in SQL with edge-case handling. Difficulty: hard. Context: for a coding challenge platform. Return deterministic output."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DESC\nLIM... |
[
{
"role": "user",
"content": "Fix this JavaScript code for rate limiter: boundary bug and null handling. Difficulty: hard. Context: for an interview prep tool. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // rate limiter in JavaScript\n if (input ... |
[
{
"role": "user",
"content": "Implement JWT verification in Bash with edge-case handling. Difficulty: easy. Context: for an internal library. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Refactor Python logic for deduplicate preserving order to improve readability and performance. Difficulty: easy. Context: for an interview prep tool. Include input validation."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"deduplicate preserving ... |
[
{
"role": "user",
"content": "Fix this Bash code for LRU cache: boundary bug and null handling. Difficulty: hard. Context: for a coding challenge platform. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\... |
[
{
"role": "user",
"content": "Refactor JavaScript logic for rate limiter to improve readability and performance. Difficulty: medium. Context: for a coding challenge platform. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // rate limiter in JavaScrip... |
[
{
"role": "user",
"content": "Implement RBAC permission check in Bash with edge-case handling. Difficulty: medium. Context: for a CLI utility. Keep it production-ready."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Write unit tests in Python for LRU cache. Difficulty: easy. Context: for a backend service. Avoid global mutable state."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"LRU cache in Python.\"\"\"\n if data is None:\n return None\n retu... |
[
{
"role": "user",
"content": "Fix this Bash code for binary search: boundary bug and null handling. Difficulty: medium. Context: for a CLI utility. Keep it production-ready."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Implement RBAC permission check in Rust with edge-case handling. Difficulty: medium. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // RBAC permission check in Rust... |
[
{
"role": "user",
"content": "Refactor TypeScript logic for email validation to improve readability and performance. Difficulty: hard. Context: for a backend service. Include input validation."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null ... |
[
{
"role": "user",
"content": "Implement sliding window maximum in Python with edge-case handling. Difficulty: medium. Context: for a backend service. Avoid global mutable state."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"sliding window maximum in Python.\"\"\"\n if dat... |
[
{
"role": "user",
"content": "Write unit tests in C++ for binary search. Difficulty: hard. Context: for an internal library. Keep it production-ready."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // binary search in C++\n return ... |
[
{
"role": "user",
"content": "Fix this TypeScript code for RBAC permission check: boundary bug and null handling. Difficulty: easy. Context: for a CLI utility. Include input validation."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n //... |
[
{
"role": "user",
"content": "Implement JWT verification in Go with edge-case handling. Difficulty: easy. Context: for a CLI utility. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // JWT verification in Go\n return input\n}"
}
] |
[
{
"role": "user",
"content": "Refactor Rust logic for JWT verification to improve readability and performance. Difficulty: easy. Context: for a backend service. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // JWT verification in R... |
[
{
"role": "user",
"content": "Implement email validation in TypeScript with edge-case handling. Difficulty: easy. Context: for a CLI utility. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // email validation in Ty... |
[
{
"role": "user",
"content": "Refactor TypeScript logic for retry with backoff to improve readability and performance. Difficulty: hard. Context: for a CLI utility. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n //... |
[
{
"role": "user",
"content": "Write a SQL function for RBAC permission check. Difficulty: medium. Context: for a backend service. Return deterministic output."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DESC\nLIMIT 50;"
}
] |
[
{
"role": "user",
"content": "Write a C++ function for rate limiter. Difficulty: medium. Context: for an interview prep tool. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // rate limiter in C++\n r... |
[
{
"role": "user",
"content": "Implement pagination helper in JavaScript with edge-case handling. Difficulty: hard. Context: for an interview prep tool. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // pagination helper in JavaScript\n if (input == ... |
[
{
"role": "user",
"content": "Write unit tests in Python for email validation. Difficulty: hard. Context: for a backend service. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"email validation in Python.\"\"\"\n if data is None:\n ret... |
[
{
"role": "user",
"content": "Fix this Go code for merge intervals: boundary bug and null handling. Difficulty: easy. Context: for a CLI utility. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // merge intervals in Go\n return input... |
[
{
"role": "user",
"content": "Implement JSON schema validation in Rust with edge-case handling. Difficulty: hard. Context: for a coding challenge platform. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // JSON schema validation in ... |
[
{
"role": "user",
"content": "Write a Bash function for webhook signature check. Difficulty: medium. Context: for a CLI utility. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Fix this Python code for webhook signature check: boundary bug and null handling. Difficulty: medium. Context: for a backend service. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"webhook signature check in Python... |
[
{
"role": "user",
"content": "Fix this Rust code for JSON schema validation: boundary bug and null handling. Difficulty: medium. Context: for a backend service. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // JSON schema validatio... |
[
{
"role": "user",
"content": "Refactor Rust logic for CSV parsing to improve readability and performance. Difficulty: easy. Context: for a CLI utility. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // CSV parsing in Rust\n input... |
[
{
"role": "user",
"content": "Write unit tests in TypeScript for binary search. Difficulty: hard. Context: for a CLI utility. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // binary search in TypeScript\n if (inp... |
[
{
"role": "user",
"content": "Fix this SQL code for sliding window maximum: boundary bug and null handling. Difficulty: medium. Context: for an interview prep tool. Keep it production-ready."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created... |
[
{
"role": "user",
"content": "Refactor JavaScript logic for CSV parsing to improve readability and performance. Difficulty: easy. Context: for a CLI utility. Avoid global mutable state."
},
{
"role": "assistant",
"content": "function solve(input) {\n // CSV parsing in JavaScript\n if (input ==... |
[
{
"role": "user",
"content": "Fix this Go code for retry with backoff: boundary bug and null handling. Difficulty: medium. Context: for an interview prep tool. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // retry with backoff in Go\n ... |
[
{
"role": "user",
"content": "Fix this Go code for two-sum: boundary bug and null handling. Difficulty: hard. Context: for a backend service. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // two-sum in Go\n return input\n}"
}
] |
[
{
"role": "user",
"content": "Refactor SQL logic for merge intervals to improve readability and performance. Difficulty: easy. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY crea... |
[
{
"role": "user",
"content": "Write a TypeScript function for deduplicate preserving order. Difficulty: hard. Context: for an internal library. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // deduplicate preservi... |
[
{
"role": "user",
"content": "Implement email validation in TypeScript with edge-case handling. Difficulty: hard. Context: for a coding challenge platform. Use idiomatic style."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // email va... |
[
{
"role": "user",
"content": "Write a C++ function for two-sum. Difficulty: hard. Context: for an interview prep tool. Avoid global mutable state."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // two-sum in C++\n return input;\n}"... |
[
{
"role": "user",
"content": "Write unit tests in JavaScript for retry with backoff. Difficulty: easy. Context: for a coding challenge platform. Avoid global mutable state."
},
{
"role": "assistant",
"content": "function solve(input) {\n // retry with backoff in JavaScript\n if (input == null)... |
[
{
"role": "user",
"content": "Write a C++ function for JWT verification. Difficulty: easy. Context: for an interview prep tool. Avoid global mutable state."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // JWT verification in C++\n ... |
[
{
"role": "user",
"content": "Write unit tests in JavaScript for pagination helper. Difficulty: easy. Context: for an interview prep tool. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // pagination helper in JavaScript\n if (input == null) return n... |
[
{
"role": "user",
"content": "Fix this TypeScript code for rate limiter: boundary bug and null handling. Difficulty: easy. Context: for a CLI utility. Add minimal comments only."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // rate li... |
[
{
"role": "user",
"content": "Implement sliding window maximum in JavaScript with edge-case handling. Difficulty: medium. Context: for an interview prep tool. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // sliding window maximum in JavaScript\n if... |
[
{
"role": "user",
"content": "Fix this TypeScript code for CSV parsing: boundary bug and null handling. Difficulty: medium. Context: for an internal library. Add minimal comments only."
},
{
"role": "assistant",
"content": "export function solve<T>(input: T | null | undefined): T | null {\n // ... |
[
{
"role": "user",
"content": "Write a SQL function for binary search. Difficulty: hard. Context: for an internal library. Keep it production-ready."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DESC\nLIMIT 50;"
}
] |
[
{
"role": "user",
"content": "Write a Rust function for LRU cache. Difficulty: medium. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // LRU cache in Rust\n input.to_string()\n}"
}
] |
[
{
"role": "user",
"content": "Fix this Bash code for pagination helper: boundary bug and null handling. Difficulty: hard. Context: for an internal library. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\... |
[
{
"role": "user",
"content": "Fix this Python code for CSV parsing: boundary bug and null handling. Difficulty: easy. Context: for a coding challenge platform. Include input validation."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"CSV parsing in Python.\"\"\"\n if data i... |
[
{
"role": "user",
"content": "Refactor Go logic for JSON schema validation to improve readability and performance. Difficulty: easy. Context: for a CLI utility. Use idiomatic style."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // JSON schema validation in Go\n ... |
[
{
"role": "user",
"content": "Write a Go function for sliding window maximum. Difficulty: hard. Context: for a backend service. Use idiomatic style."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // sliding window maximum in Go\n return input\n}"
}
] |
[
{
"role": "user",
"content": "Implement two-sum in Bash with edge-case handling. Difficulty: easy. Context: for a coding challenge platform. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Write a JavaScript function for RBAC permission check. Difficulty: medium. Context: for an internal library. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // RBAC permission check in JavaScript\n if (input == null) retu... |
[
{
"role": "user",
"content": "Fix this JavaScript code for binary search: boundary bug and null handling. Difficulty: easy. Context: for a coding challenge platform. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // binary search in JavaScript\n if ... |
[
{
"role": "user",
"content": "Write a Rust function for pagination helper. Difficulty: easy. Context: for a coding challenge platform. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // pagination helper in Rust\n input.to_string(... |
[
{
"role": "user",
"content": "Fix this Python code for LRU cache: boundary bug and null handling. Difficulty: hard. Context: for a coding challenge platform. Include input validation."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"LRU cache in Python.\"\"\"\n if data is No... |
[
{
"role": "user",
"content": "Fix this Python code for CSV parsing: boundary bug and null handling. Difficulty: easy. Context: for a CLI utility. Avoid global mutable state."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"CSV parsing in Python.\"\"\"\n if data is None:\n ... |
[
{
"role": "user",
"content": "Write unit tests in C++ for two-sum. Difficulty: easy. Context: for a backend service. Avoid global mutable state."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // two-sum in C++\n return input;\n}"
... |
[
{
"role": "user",
"content": "Fix this SQL code for deduplicate preserving order: boundary bug and null handling. Difficulty: hard. Context: for a CLI utility. Keep it production-ready."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at D... |
[
{
"role": "user",
"content": "Fix this SQL code for deduplicate preserving order: boundary bug and null handling. Difficulty: easy. Context: for a backend service. Keep it production-ready."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_... |
[
{
"role": "user",
"content": "Refactor Go logic for sliding window maximum to improve readability and performance. Difficulty: hard. Context: for a CLI utility. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // sliding window maximum in G... |
[
{
"role": "user",
"content": "Refactor JavaScript logic for pagination helper to improve readability and performance. Difficulty: medium. Context: for an internal library. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // pagination helper in JavaScri... |
[
{
"role": "user",
"content": "Implement sliding window maximum in Rust with edge-case handling. Difficulty: medium. Context: for an interview prep tool. Use idiomatic style."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // sliding window maximum in Rust\n i... |
[
{
"role": "user",
"content": "Fix this Go code for sliding window maximum: boundary bug and null handling. Difficulty: hard. Context: for a CLI utility. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // sliding window maximum in Go\n ... |
[
{
"role": "user",
"content": "Fix this Bash code for binary search: boundary bug and null handling. Difficulty: hard. Context: for a CLI utility. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
... |
[
{
"role": "user",
"content": "Fix this Go code for LRU cache: boundary bug and null handling. Difficulty: easy. Context: for a backend service. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // LRU cache in Go\n return input\n}"
}
] |
[
{
"role": "user",
"content": "Refactor SQL logic for JSON schema validation to improve readability and performance. Difficulty: medium. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDE... |
[
{
"role": "user",
"content": "Refactor Bash logic for sliding window maximum to improve readability and performance. Difficulty: medium. Context: for an interview prep tool. Keep it production-ready."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\... |
[
{
"role": "user",
"content": "Fix this Go code for webhook signature check: boundary bug and null handling. Difficulty: hard. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // webhook signature chec... |
[
{
"role": "user",
"content": "Write unit tests in C++ for webhook signature check. Difficulty: easy. Context: for an interview prep tool. Keep time complexity efficient."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // webhook signat... |
[
{
"role": "user",
"content": "Write a SQL function for merge intervals. Difficulty: hard. Context: for a backend service. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DESC\nLIMIT 50;"
}
] |
[
{
"role": "user",
"content": "Implement top-k frequent elements in Rust with edge-case handling. Difficulty: medium. Context: for a CLI utility. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // top-k frequent elements in Rust\n ... |
[
{
"role": "user",
"content": "Write unit tests in Python for two-sum. Difficulty: medium. Context: for a CLI utility. Include input validation."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"two-sum in Python.\"\"\"\n if data is None:\n return None\n return data"... |
[
{
"role": "user",
"content": "Refactor Rust logic for webhook signature check to improve readability and performance. Difficulty: medium. Context: for an interview prep tool. Use idiomatic style."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // webhook signatu... |
[
{
"role": "user",
"content": "Fix this SQL code for two-sum: boundary bug and null handling. Difficulty: hard. Context: for an internal library. Return deterministic output."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DESC\nLIMIT 5... |
[
{
"role": "user",
"content": "Fix this JavaScript code for webhook signature check: boundary bug and null handling. Difficulty: medium. Context: for a coding challenge platform. Include input validation."
},
{
"role": "assistant",
"content": "function solve(input) {\n // webhook signature check... |
[
{
"role": "user",
"content": "Implement deduplicate preserving order in Go with edge-case handling. Difficulty: hard. Context: for a backend service. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // deduplicate preserving order in Go\n ... |
[
{
"role": "user",
"content": "Write unit tests in Go for CSV parsing. Difficulty: easy. Context: for a CLI utility. Add minimal comments only."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // CSV parsing in Go\n return input\n}"
}
] |
[
{
"role": "user",
"content": "Write a JavaScript function for two-sum. Difficulty: hard. Context: for a backend service. Add minimal comments only."
},
{
"role": "assistant",
"content": "function solve(input) {\n // two-sum in JavaScript\n if (input == null) return null;\n return input;\n}"
... |
[
{
"role": "user",
"content": "Implement pagination helper in C++ with edge-case handling. Difficulty: easy. Context: for a coding challenge platform. Avoid global mutable state."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // pagina... |
[
{
"role": "user",
"content": "Fix this C++ code for pagination helper: boundary bug and null handling. Difficulty: medium. Context: for a coding challenge platform. Keep it production-ready."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n... |
[
{
"role": "user",
"content": "Write unit tests in Rust for two-sum. Difficulty: medium. Context: for a coding challenge platform. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // two-sum in Rust\n input.to_string()\n}"
}
] |
[
{
"role": "user",
"content": "Write a Rust function for binary search. Difficulty: medium. Context: for a CLI utility. Use idiomatic style."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // binary search in Rust\n input.to_string()\n}"
}
] |
[
{
"role": "user",
"content": "Implement binary search in Python with edge-case handling. Difficulty: medium. Context: for a backend service. Include input validation."
},
{
"role": "assistant",
"content": "def binary_search(arr, target):\n lo, hi = 0, len(arr) - 1\n while lo <= hi:\n ... |
[
{
"role": "user",
"content": "Fix this SQL code for sliding window maximum: boundary bug and null handling. Difficulty: medium. Context: for a CLI utility. Return deterministic output."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created_at DE... |
[
{
"role": "user",
"content": "Fix this Python code for email validation: boundary bug and null handling. Difficulty: hard. Context: for a CLI utility. Avoid global mutable state."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"email validation in Python.\"\"\"\n if data is ... |
[
{
"role": "user",
"content": "Fix this Go code for two-sum: boundary bug and null handling. Difficulty: hard. Context: for a coding challenge platform. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "func Solve(input string) string {\n // two-sum in Go\n return input\n... |
[
{
"role": "user",
"content": "Write unit tests in C++ for deduplicate preserving order. Difficulty: hard. Context: for a CLI utility. Keep it production-ready."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n // deduplicate preserving o... |
[
{
"role": "user",
"content": "Refactor C++ logic for two-sum to improve readability and performance. Difficulty: medium. Context: for a coding challenge platform. Avoid global mutable state."
},
{
"role": "assistant",
"content": "#include <string>\nstd::string solve(const std::string& input) {\n... |
[
{
"role": "user",
"content": "Refactor Rust logic for JWT verification to improve readability and performance. Difficulty: easy. Context: for an interview prep tool. Handle edge cases explicitly."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // JWT verificatio... |
[
{
"role": "user",
"content": "Implement RBAC permission check in Bash with edge-case handling. Difficulty: medium. Context: for a backend service. Return deterministic output."
},
{
"role": "assistant",
"content": "#!/usr/bin/env bash\nset -euo pipefail\ninput=\"${1:-}\"\necho \"$input\""
}
] |
[
{
"role": "user",
"content": "Refactor SQL logic for email validation to improve readability and performance. Difficulty: easy. Context: for an interview prep tool. Keep it production-ready."
},
{
"role": "assistant",
"content": "SELECT id, name\nFROM items\nWHERE active = TRUE\nORDER BY created... |
[
{
"role": "user",
"content": "Write unit tests in Rust for email validation. Difficulty: hard. Context: for an interview prep tool. Return deterministic output."
},
{
"role": "assistant",
"content": "pub fn solve(input: &str) -> String {\n // email validation in Rust\n input.to_string()\n}... |
[
{
"role": "user",
"content": "Fix this Python code for rate limiter: boundary bug and null handling. Difficulty: medium. Context: for a CLI utility. Include input validation."
},
{
"role": "assistant",
"content": "def solve(data):\n \"\"\"rate limiter in Python.\"\"\"\n if data is None:\n ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.