Parts of a programming problem

Programming questions on the HackerEarth platform must have the following components:

  1. Description
    • Includes the problem statement and problem name
    • Critical to a question because it tells candidates what their tasks are

  2. Solution and test cases
    • Contains the solution to the problem, which includes sample input, sample output, and test cases
    • Critical to a question because a candidate's code is evaluated against the solution

  3. Code snippets
    • Add starter code in 38+ languages
    • Allows candidates to focus on writing the logic required to solve the problem

      Tip: Use our auto code snippet generator to generate code snippets in C, C++, C++14, C++17, C#, Java, Java 8, JavaScript (Node.js), PHP, Python, Python 3, Python 3.8, Ruby.

  4. Editorial
    • You can use this field to enter the approach or answers that can be used to solve the problem.
    • This will not be visible to the candidate.
    • This field has been provided to save information about the solution to the problem. This helps you access this information quickly when required.

Related topics