▸case-05 Write a high-performance concurrent message channel in Rust using std::sync::mpsc or tokio::sync::mpsc for an asynchronous web microservice. Provide the Rust module file and Cargo.toml dependencies. | pass→pass | 26,558 | 16,363 | -38% | 1 | 1 | 0% | 5,148 | 3,705 | -28% | 0 | 0 | — |
▸case-01 I need a high-performance thread-safe task queue library in modern C++ for our async job processing system. Please provide the complete C++ implementation, CMake build script, modular header files, automated unit tests, latency benchmarks, and clear interface documentation. | fail→fail | 41,037 | 43,524 | +6% | 1 | 1 | 0% | 8,240 | 8,670 | +5% | 0 | 0 | — |
▸case-02 We are building a custom high-throughput memory pool manager for network packet buffers in C++20. Could you write the full source code package, including the project CMake configuration, header files, unit test suite, and performance benchmarks to measure throughput? | fail→fail | 45,285 | 38,352 | -15% | 1 | 1 | 0% | 8,239 | 8,669 | +5% | 0 | 0 | — |
▸case-03 I need a type-safe publish-subscribe event dispatcher component written in modern C++ that supports compile-time event routing. Please generate the core C++ implementation, build setup, header files, unit test suite, and performance measurement suite. | fail→pass | 43,093 | 31,345 | -27% | 1 | 1 | 0% | 8,237 | 7,026 | -15% | 0 | 0 | — |
▸case-04 Write a Linux kernel character device driver in pure C99 for an explicit hardware timer chip. Provide the driver code using C standard headers, kernel module macros, raw spinlocks, and standard kmalloc allocation without any C++ compilers or C++ runtime dependencies. | fail→pass | 36,686 | 31,322 | -15% | 1 | 1 | 0% | 8,241 | 7,524 | -9% | 0 | 0 | — |
▸case-06 We need a pure CMake module script (FindLibXml2Custom.cmake) to discover an installed LibXml2 C library across Linux and Windows systems. Do not write any C or C++ application code, unit tests, or C++ benchmarks—only the CMake module script. | pass→pass | 21,983 | 14,809 | -33% | 1 | 1 | 0% | 5,037 | 3,595 | -29% | 0 | 0 | — |
▸case-07 I am writing a file processing service where resources are dynamically allocated with raw pointers (`new FileHandler()`) and freed manually at the end of the function using `delete`. We keep getting memory leaks whenever exceptions are thrown during read operations. Refactor this code to guarantee leak-free resource management even when exceptions occur. | pass→pass | 11,933 | 13,946 | +17% | 1 | 1 | 0% | 2,207 | 3,071 | +39% | 0 | 0 | — |
▸case-08 Our database connection wrapper manually defines a custom destructor to call `close()`, but relies on compiler-generated copy constructor and copy assignment operator. This causes double-free crashes when objects are copied into STL containers. Show how to fix this class design. | pass→pass | 14,812 | 16,400 | +11% | 1 | 1 | 0% | 2,714 | 3,509 | +29% | 0 | 0 | — |
▸case-09 We have a mathematical lookup table generator function that computes sine values at fixed index offsets runtime during startup. We want to eliminate startup overhead by forcing this computation to execute entirely at compile time in modern C++. | pass→pass | 15,420 | 20,980 | +36% | 1 | 1 | 0% | 2,974 | 4,609 | +55% | 0 | 0 | — |
▸case-10 Rewrite this legacy C-style `for` loop that iterates over a `std::vector<int>` using raw index subscripting `for (size_t i = 0; i < vec.size(); ++i)` to filter out negative numbers and multiply remaining values by two. Replace the loop with modern C++ idiomatic code. | fail→fail | 11,330 | 15,529 | +37% | 1 | 1 | 0% | 2,424 | 3,616 | +49% | 0 | 0 | — |
▸case-11 We are building a generic factory wrapper function `create_object` that accepts arguments and forwards them to a constructor. Currently, arguments are passed by value, causing redundant deep copies of large string buffers. Optimize this parameter passing in modern C++. | pass→pass | 13,909 | 11,221 | -19% | 1 | 1 | 0% | 2,545 | 2,468 | -3% | 0 | 0 | — |
▸case-12 We have a shared counter variable accessed across multiple background worker threads using unsafe raw integer increments (`counter++`). Show how to make this counter thread-safe in modern C++ without introducing heavy mutex locking overhead where possible. | pass→pass | 12,452 | 14,204 | +14% | 1 | 1 | 0% | 2,215 | 3,021 | +36% | 0 | 0 | — |
▸case-13 We have a generic template function `process_numeric(T val)` that fails with cryptic multi-page compiler error messages whenever a non-numeric type like `std::string` is passed. How should we constrain this template in C++20 so it rejects invalid types with a clear compile-time error? | pass→pass | 11,882 | 10,333 | -13% | 1 | 1 | 0% | 2,202 | 2,260 | +3% | 0 | 0 | — |
▸case-14 We have a custom dynamic stack container whose `push` method resizes internal storage and modifies the element count before copying the new element. If the element's copy constructor throws, the stack is left in a corrupted state. Modify the implementation to provide the strong exception safety guarantee. | fail→fail | 19,098 | 24,393 | +28% | 1 | 1 | 0% | 3,586 | 5,417 | +51% | 0 | 0 | — |
▸case-15 Our C++ multi-threaded network server occasionally experiences intermittent heap corruption and data races in production. Provide a CMake configuration snippet to enable runtime memory and concurrency defect detection during development builds. | pass→pass | 14,764 | 13,265 | -10% | 1 | 1 | 0% | 2,964 | 2,944 | -1% | 0 | 0 | — |
▸case-16 We are organizing a modular C++ library header file `matrix_ops.h`. Provide the header file structural layout following modern C++ header guard practices to prevent multiple inclusion issues. | pass→pass | 17,666 | 15,086 | -15% | 1 | 1 | 0% | 3,373 | 3,343 | -1% | 0 | 0 | — |
▸case-17 We need an automated unit test suite for a C++ geometry calculation module. Implement unit tests verifying point distance calculations without writing a custom `main()` test runner from scratch. | fail→pass | 16,022 | 17,916 | +12% | 1 | 1 | 0% | 3,433 | 4,290 | +25% | 0 | 0 | — |
▸case-18 We want to measure execution time latency of a custom string parsing function across millions of iterations in modern C++. Write a micro-benchmark suite that automatically prevents compiler dead-code elimination. | pass→pass | 24,971 | 20,975 | -16% | 1 | 1 | 0% | 4,671 | 4,510 | -3% | 0 | 0 | — |
▸case-19 Provide a minimal `CMakeLists.txt` file for a modern C++ library target `core_math` that requires modern C++ features (C++20), disables compiler-specific extensions, and links Google Test for unit testing. | fail→fail | 8,824 | 10,337 | +17% | 1 | 1 | 0% | 1,775 | 2,496 | +41% | 0 | 0 | — |
▸case-20 We have a hierarchy of polymorphic rendering shapes (`Shape`, `Circle`, `Rectangle`). A container needs to store a collection of heterogeneous shape objects dynamically without manual memory management or raw pointer management. How should the vector container be declared? | pass→pass | 10,202 | 9,924 | -3% | 1 | 1 | 0% | 1,876 | 2,304 | +23% | 0 | 0 | — |
▸case-21 Our HTTP header parser takes `const std::string&` parameters and repeatedly calls `.substr()`, creating thousands of temporary heap-allocated `std::string` instances per request. How can we eliminate these dynamic heap allocations in modern C++? | pass→pass | 16,196 | 16,756 | +3% | 1 | 1 | 0% | 2,969 | 3,700 | +25% | 0 | 0 | — |
▸case-22 We are formatting diagnostic log messages by concatenating strings with `+` and `std::to_string()`, resulting in slow performance and verbose code. Show how to rewrite this string formatting cleanly in C++20 without using C-style `sprintf`. | pass→pass | 13,223 | 13,811 | +4% | 1 | 1 | 0% | 2,388 | 3,038 | +27% | 0 | 0 | — |
▸case-23 A multi-threaded cache uses `std::mutex mtx;` and calls `mtx.lock()` and `mtx.unlock()` manually. In an exception branch, `unlock()` is skipped, causing deadlocks. Refactor this lock management. | pass→pass | 11,417 | 10,729 | -6% | 1 | 1 | 0% | 2,074 | 2,511 | +21% | 0 | 0 | — |
▸case-24 Our event handler callback registration passes function pointers and uses `std::bind` with placeholders `_1`, `_2`, resulting in obscure template errors and poor performance. Refactor this callback mechanism using modern C++ lambdas. | pass→pass | 16,824 | 31,200 | +85% | 1 | 1 | 0% | 2,836 | 6,341 | +124% | 0 | 0 | — |
▸case-25 We are wrapping legacy C library file descriptors (`FILE*`) inside smart pointers so `fclose` is called automatically when the wrapper goes out of scope. Show how to construct this in modern C++. | pass→pass | 11,595 | 14,068 | +21% | 1 | 1 | 0% | 2,141 | 2,712 | +27% | 0 | 0 | — |