Student Guide For Coding Interface
This document explains how students should write code on HackerRank and the ACSL (RaiseExamScore) portal. It clarifies method naming, input/output handling, and the different coding styles available to students.
HackerRank (Method-Based Coding)
On HackerRank, problems follow a strict method-only model.
- Method Name: Already provided in the editor template (e.g.,
findNumber) - How to get Input: Input is passed through method parameters
- How to give the Answer: Use the
returnstatement - Student Responsibility: Implement logic only inside the given method
static int findNumber(int[] arr, int k) {
// Write your logic here
return 0;
}
ACSL Portal (RaiseExamScore) – Flexible Coding Styles
On https://acsl.raiseexamscores.com/, students can choose between two coding styles by switching tabs in the editor.
ACSL – Java Tab (Full Program Style)
The Java tab allows students to write a complete Java program.
- Method Name: Students write the
mainmethod themselves - How to get Input: Read input manually using
Scanner - How to give the Answer: Use
System.out.println() - Use Case: Full-program and advanced challenges
Example View (ACSL Java Tab)
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n);
}
}
ACSL – Java_method Tab (Method-Only Style)
The Java_method tab is designed to match the exact same coding style as HackerRank.
- Method Name: Predefined in the template
- How to get Input: Provided via method parameters
- How to give the Answer: Use the
returnstatement - Use Case: Practice HackerRank-style problems
Example View (ACSL Java_method Tab)
class Result {
public static int findNumber(int[] arr, int k) {
// Write your logic here
return 0;
}
}
Quick Comparison: HackerRank vs ACSL Portal
- HackerRank: Method-only, method name predefined, return the answer
- ACSL Java Tab: Full program, Scanner for input, println for output
- ACSL Java_method Tab: Method-only, identical to HackerRank style
Important Reminders for Students
- Do not add a Scanner on HackerRank
- Do not use
System.out.println()for the final answer on HackerRank - Always use the
returnstatement on HackerRank - Check the tabs in the ACSL portal and switch to Java_method to practice HackerRank-style problems
Following these guidelines will ensure your solutions run correctly across both platforms.