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 involved in fixing compilation issues.
Auto-Complete for Coding Questions
The auto-complete feature automatically gets triggered at specific syntax points when you are coding in BASH, C, C++, C++14, C++20, C#, GO, Java7, Java15, Java8, JavaScript (Node.js), Kotlin, Python2, Python3, Ruby, Swift, TypeScript.
For example, while coding in Python, when you type Sys., you will see the different syntax suggestions in the auto-complete popup 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 which can result 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 the CTRL + Space key to trigger the auto-complete pop-up menu manually.
Auto-Complete in the IDE for Projects type Questions
In the IDE, press CTRL + SPACE to trigger the auto-complete pop-up menu, and press TAB to add the top suggestion.