Skip to content

Algorithms

This content is for DSA. Switch to the latest version for up-to-date documentation.

An algorithm is a step-by-step procedure or step-by-step instructions for solving a problem or completing a task.

  1. Input - Accepts zero or one or more inputs.
  2. Output - Produces at least one output.
  3. Finiteness - Terminates after a finite number of steps.
  4. Correctness - Produces the correct output for all valid inputs.
  5. Definiteness - Each step is clearly and unambiguously defined.
  6. Efficiency - Uses minimal time (time complexity) and space (space complexity).
Built with passion by Ngineer Lab