---
title: Parts of a programming problem
description: Programming questions on the HackerEarth platform must have the following components:
---

[Skip to content](https://help.hackerearth.com/hc/en-us/articles/360004130894-parts-of-a-programming-problem#main-content)

English

Show submenu for translations

![HE logo.png\]](https://help.hackerearth.com/hs-fs/hubfs/HE%20logo.png?height=40&name=HE%20logo.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Help Center](https://help.hackerearth.com/?hsLang=en)
2. [Assessments: Recruiters](https://help.hackerearth.com/assessments-recruiters?hsLang=en)
3. [Programming](https://help.hackerearth.com/assessments-recruiters?hsLang=en#programming)

# 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**

- [Code snippets](https://support.hackerearth.com/hc/en-us/articles/360005347153)
- [Generating code snippets manually](https://support.hackerearth.com/hc/en-us/articles/360005288154-Generating-your-code-snippets-manually)
- [Generating code snippets automatically](https://support.hackerearth.com/hc/en-us/articles/360005344333-Generating-your-code-snippets-automatically)

- [Assessments: Recruiters](https://help.hackerearth.com/assessments-recruiters?hsLang=en#main-content)

    - [Getting started](https://help.hackerearth.com/assessments-recruiters?hsLang=en#getting-started)
    - [Account settings](https://help.hackerearth.com/assessments-recruiters?hsLang=en#account-settings)
    - [Admin management](https://help.hackerearth.com/assessments-recruiters?hsLang=en#admin-management)
    - [Creating tests automatically](https://help.hackerearth.com/assessments-recruiters?hsLang=en#creating-tests-automatically)
    - [Creating tests manually](https://help.hackerearth.com/assessments-recruiters?hsLang=en#creating-tests-manually)
    - [Test settings](https://help.hackerearth.com/assessments-recruiters?hsLang=en#test-settings)
    - [Sections and question pooling](https://help.hackerearth.com/assessments-recruiters?hsLang=en#sections-and-question-pooling)
    - [Libraries](https://help.hackerearth.com/assessments-recruiters?hsLang=en#libraries)
    - [Multiple Choice Questions (MCQs)](https://help.hackerearth.com/assessments-recruiters?hsLang=en#multiple-choice-questions-mcqs)
    - [Programming](https://help.hackerearth.com/assessments-recruiters?hsLang=en#programming)
    - [Project](https://help.hackerearth.com/assessments-recruiters?hsLang=en#project)
    - [SQL](https://help.hackerearth.com/assessments-recruiters?hsLang=en#sql)
    - [Data science](https://help.hackerearth.com/assessments-recruiters?hsLang=en#data-science)
    - [Machine Learning (ML)](https://help.hackerearth.com/assessments-recruiters?hsLang=en#machine-learning-ml)
    - [DevOps](https://help.hackerearth.com/assessments-recruiters?hsLang=en#devops)
    - [Python project questions](https://help.hackerearth.com/assessments-recruiters?hsLang=en#python-project-questions)
    - [Automation Testing](https://help.hackerearth.com/assessments-recruiters?hsLang=en#automation-testing)
    - [Java Project](https://help.hackerearth.com/assessments-recruiters?hsLang=en#java-project)
    - [C# project questions](https://help.hackerearth.com/assessments-recruiters?hsLang=en#c-project-questions)
    - [Subjective](https://help.hackerearth.com/assessments-recruiters?hsLang=en#subjective)
    - [Approximate](https://help.hackerearth.com/assessments-recruiters?hsLang=en#approximate)
    - [Diagram](https://help.hackerearth.com/assessments-recruiters?hsLang=en#diagram)
    - [File upload](https://help.hackerearth.com/assessments-recruiters?hsLang=en#file-upload)
    - [Invites](https://help.hackerearth.com/assessments-recruiters?hsLang=en#invites)
    - [Reports](https://help.hackerearth.com/assessments-recruiters?hsLang=en#reports)
    - [Billing](https://help.hackerearth.com/assessments-recruiters?hsLang=en#billing)
    - [HackerEarth Reports: Admins, Tests, and Teams](https://help.hackerearth.com/assessments-recruiters?hsLang=en#hackerearth-reports-admins-tests-and-teams)
    - [Technical Content Updates](https://help.hackerearth.com/assessments-recruiters?hsLang=en#technical-content-updates)
- [FaceCode](https://help.hackerearth.com/facecode?hsLang=en#main-content)

    - [FaceCode and its features](https://help.hackerearth.com/facecode?hsLang=en#facecode-and-its-features)
    - [Scheduling interviews on FaceCode](https://help.hackerearth.com/facecode?hsLang=en#scheduling-interviews-on-facecode)
- [Assessments: ATS integrations](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#main-content)

    - [Integration](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#integration)
    - [iCIMS](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#icims)
    - [Zoho Recruit](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#zoho-recruit)
    - [SmartRecruiters](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#smartrecruiters)
    - [EightFold](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#eightfold)
    - [SuccessFactors](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#successfactors)
    - [Greenhouse](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#greenhouse)
    - [Lever](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#lever)
    - [Linkedin Talent Hub](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#linkedin-talent-hub)
    - [JazzHR](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#jazzhr)
    - [Workable](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#workable)
    - [Recruiterbox - Trakstar Hire](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#recruiterbox-trakstar-hire)
    - [Jobvite](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#jobvite)
    - [Ashby](https://help.hackerearth.com/assessments-ats-integrations?hsLang=en#ashby)
- [Assessments: Product updates](https://help.hackerearth.com/assessments-product-updates?hsLang=en#main-content)

    - [Release notes: HackerEarth Assessment](https://help.hackerearth.com/assessments-product-updates?hsLang=en#release-notes-hackerearth-assessment)
    - [Root Cause Analysis (RCA)](https://help.hackerearth.com/assessments-product-updates?hsLang=en#root-cause-analysis-rca)
    - [Content updates](https://help.hackerearth.com/assessments-product-updates?hsLang=en#content-updates)
- [Assessments: Best practices](https://help.hackerearth.com/assessments-best-practices?hsLang=en#main-content)

    - [Recruit](https://help.hackerearth.com/assessments-best-practices?hsLang=en#recruit)
- [SSO](https://help.hackerearth.com/sso?hsLang=en#main-content)

    - [SSO](https://help.hackerearth.com/sso?hsLang=en#sso)
- [Upskilling](https://help.hackerearth.com/upskilling?hsLang=en#main-content)

    - [Introduction: Upskilling](https://help.hackerearth.com/upskilling?hsLang=en#introduction-upskilling)
- [Assessments: Candidates](https://help.hackerearth.com/assessments-candidates?hsLang=en#main-content)

    - [Getting started](https://help.hackerearth.com/assessments-candidates?hsLang=en#getting-started)
    - [Test environment](https://help.hackerearth.com/assessments-candidates?hsLang=en#test-environment)
    - [Question types](https://help.hackerearth.com/assessments-candidates?hsLang=en#question-types)
    - [FaceCode](https://help.hackerearth.com/assessments-candidates?hsLang=en#facecode)
    - [Feedback and queries](https://help.hackerearth.com/assessments-candidates?hsLang=en#feedback-and-queries)
- [Problem setting for HackerEarth](https://help.hackerearth.com/problem-setting-for-hackerearth?hsLang=en#main-content)

    - [Rate cards](https://help.hackerearth.com/problem-setting-for-hackerearth?hsLang=en#rate-cards)
- [Campus](https://help.hackerearth.com/campus?hsLang=en#main-content)

    - [Recruiters](https://help.hackerearth.com/campus?hsLang=en#recruiters)
    - [Recruiter FAQs](https://help.hackerearth.com/campus?hsLang=en#recruiter-faqs)
    - [Candidate FAQs](https://help.hackerearth.com/campus?hsLang=en#candidate-faqs)
- [Hackathons and Hiring Challenges](https://help.hackerearth.com/hackathons-and-hiring-challenges?hsLang=en#main-content)

    - [Hackathons](https://help.hackerearth.com/hackathons-and-hiring-challenges?hsLang=en#hackathons)
    - [Hiring challenges](https://help.hackerearth.com/hackathons-and-hiring-challenges?hsLang=en#hiring-challenges)
- [Frequently Asked Questions (FAQs)](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#main-content)

    - [Assessments: Recruiters](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#assessments-recruiters)
    - [GDPR compliance (Candidates)](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#gdpr-compliance-candidates)
    - [GDPR compliance (Recruiters)](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#gdpr-compliance-recruiters)
    - [General](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#general)
    - [Assessments: Candidates](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#assessments-candidates)
    - [HackerEarth Vs ChatGPT](https://help.hackerearth.com/frequently-asked-questions-faqs?hsLang=en#hackerearth-vs-chatgpt)
- [Profiles](https://help.hackerearth.com/profiles?hsLang=en#main-content)

    - [Profiles - Recruiter](https://help.hackerearth.com/profiles?hsLang=en#profiles-recruiter)
- [OnScreen](https://help.hackerearth.com/onscreen?hsLang=en#main-content)

    - [OnScreen - Interview templates](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-interview-templates)
    - [OnScreen - Sending Invites](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-sending-invites)
    - [OnScreen - Download reports](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-download-reports)
    - [OnScreen - Interview Analytics](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-interview-analytics)
    - [OnScreen - Overview](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-overview)
    - [OnScreen - Interview Proctoring Settings](https://help.hackerearth.com/onscreen?hsLang=en#onscreen-interview-proctoring-settings)

[![Chill listening crop-3](https://help.hackerearth.com/hs-fs/hubfs/HE%20Logo%20for%20sig-1.png?width=120&height=24&name=HE%20Logo%20for%20sig-1.png "Chill listening crop-3")](https://www.hackerearth.com/)

Copyright © 2026, HackerEarth