HackerRank Online Assessment Experience (Java + SQL + Debugging)
The test had 4 sections covering MCQs, SQL, bug fixing, and coding.
Time -> 70 minutes.
📌 Section 1 – Java MCQs (4 Questions)
Mix of single and multiple-choice questions focused on core Java concepts:
📌 Section 2 – SQL Query
Two tables were provided:
Task:
Write a SQL query to fetch email IDs where the associated date falls on a weekend (Saturday/Sunday). Required good understanding of JOIN, DATE functions, and filtering logic.
My Solution ->
SELECT t1.email, DAYNAME(t2.date) AS day_name
FROM table1 t1
JOIN table2 t2 ON t1.id = t2.id
WHERE DAYOFWEEK(t2.date) IN (1, 7);📌 Section 3 – Java Debugging Task
You were given a small Java web application with:
Controller, Service, Repository, Unit tests
Objective:
Fix the bugs in the code so that all unit tests pass. This tested understanding of Spring Boot annotations, dependency injection, and logic errors.
📌 Section 4 – Password Validation Coding Question
You were given a list of passwords and had to filter valid ones based on specific rules:
⚠️ Tricky part: Passwords with only special characters (like @#$%) were considered valid