Skip to content
English
  • There are no suggestions because the search field is empty.

Code editor validation rules

HackerEarth has introduced specific code editor validation rules to maintain the integrity of the code execution environment.

Universal rules (applicable to all question types)

Restrictive rules that are applied to all question types.

Restriction

Description

Why

Proxy environment variables are not allowed.

Environment variables such as http_proxy or https_proxy are not allowed.

To prevent user-submitted code from routing network requests through external network paths.

Rules for specific question types

Restrictive rules that are applied to particular question types.

Restriction

Question  type

Description

Why

System command execution is not allowed.

Programming, Approximate, Golf

Language features that execute arbitrary system commands are not allowed.


Note: In languages like Ruby, commands such as system() or system () are filtered out.

To prevent compromising the execution environment or introducing security vulnerabilities.

Use of the package keyword is not allowed.

Java

The package keyword is not allowed in the Java submissions. 


Note: This restriction applies even if the keyword is used inside comments.

To compile and evaluate the candidate submission in a controlled workspace. 

Multiple top-level SELECT statements are not allowed.

SQL

Only one top-level SELECT statement can be used in SQL submission.


Note: Only subqueries containing SELECT statements are supported within the main query.

To ensure that each SQL submission produces a single result set in our evaluation environment, which is necessary for accurate automated checking.