With new additions and improvements, HackerRank CodePair, (a live online interview platform for hiring companies to conduct coding interviews) now comes with REPL(Read-eval-print-loop) support, an interactive shell that takes user inputs, executes blocks of code and returns the result to the user in realtime. Using REPL(Read-eval-print-loop), candidates can check for correctness before writing code and evaluate piecewise code.
- You, the interviewer, must be logged in to your HackerRank for Work account and have access to CodePair.
- Upon logging into the CodePair session, the interviewer can invite candidates, import a question from the HackerRank library, and also choose to have multiple questions or tabs to use during the interview.
- With REPL, interviewers can now review the candidate's code in real-time, ask questions, and understand the candidate’s approach to problem-solving instantly.
- With added REPL support, the code is run in real-time and the result is displayed.
- REPL enabled languages Python and Python 3 also allow for taking real-time input, hence the input can be given in the run output tab directly, and a separate 'Input' tab will not be present. From the image below, it is clear that the input is given in the Run Output tab, and the output is generated in the same tab, instantly.
- For all other languages, the input is given in a separate 'Input' tab, as shown below.
- For REPL enabled languages, REPL support will be available inside the 'Run Output' tab and clicking on the 'Run code' button will show the code output inside the 'Run Output' tab.
- Running test cases for REPL enabled languages works such that clicking the 'Run Tests' button will show the result of Test cases inside the 'Test Output' tab, as shown below.