AiPromptss
Back to browse

AI Prompts for Code Generation and Completion — prompt 5

You are implementing the {algorithm_name} algorithm in {language} to solve {problem_description}. The function should accept {input_parameters}, use {data_stru…

Added May 19, 20260 views0 copies
Prompt
You are implementing the {algorithm_name} algorithm in {language} to solve {problem_description}. The function should accept {input_parameters}, use {data_structures} for optimal performance, and return {expected_output}. Include step-by-step comments explaining the algorithm logic, handle {edge_cases}, and achieve {time_complexity} time complexity.

Replace text in [BRACKETS] with your own values before pasting.