generate naive two-sum problem solution in zig
- User
generate naive two-sum problem solution in zig
Assistant
Here's a simple (naive) solution to the Two Sum problem in Zig:
🧠 Problem Summary:
Given an array of integers
numsand an integertarget, return the indices of the two numbers such that they add up totarget.You may assume that each input would have exactly one solution, and you may not use the same element twice.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.