Overview
The code editor available in the HackerRank Tests has an Intellisense-like-autocomplete feature similar to what is found in modern editors such as Eclipse or Visual Studio. While typing code in HackerRank Tests, this feature allows Candidates to speed up their coding and reduces the keyboard input time using auto-completion syntax pop-ups. It also hints at any syntax errors beforehand and saves the candidates' time to fix compilation issues.
Auto-Complete for Coding Questions
The auto-complete feature automatically gets triggered at specific syntax points when you are coding in C, C++11, Java7, C#, Python, 2, Ruby, BASH, Oracle, (PL/SQL enabled), MySQL, SQL, PostgreSQL, Javascript (Node.js), TypesScript, Go, Python 3, MS SQL Server, Java8, DB2, Swift, C++14, Kotlin, Java 15, C++20.
For example, while coding in Python, when you type Sys. You will see the different syntax suggestions in the auto-complete pop-up menu, as shown below. You can choose from the available suggestions and adopt them by typing the Tab or Enter key.
With auto-complete enabled, the editor identifies and underlines incorrect syntax, resulting in compilation errors. Hover your mouse over the code, and a tool-tip describes the error. You can fix these errors early and save time in your Test.
Enabling/Disabling Auto-complete
In your coding Tests, click the three dots and Enable/Disable the auto-complete feature as required. While typing your code in the editor:
- Press CTRL + Space key to trigger the auto-complete pop-up menu manually.
Auto-Complete in the IDE for Projects type Questions
Press CTRL + SPACE to trigger the auto-complete pop-up menu in the IDE, and press TAB to add the top suggestion.