Allen Digital | Allen | SDE - 2 Backend | Machine coding round

allen digital logo
allen digital
SDE - 2 Backend
April 29, 2025 • 4 reads

Summary

I had a machine coding round for an SDE-2 Backend role at Allen Digital, where I was given 90-100 minutes to code a solution for an Online Test Proctoring System problem.

Full Experience

I was shared this google sheet and this was the question

What happened during the interview ? I Wrote the code in intelli j , Java 15 minutes : We discussed question and my doubts 90 - 100 Min : i coded out the solution last 15 - 30 min : discussed the solution

I submitted my solution to him on mail by sending the complete folder

Interview Questions (1)

Q1
Online Test Proctoring System
Data Structures & AlgorithmsHard

Allen Digital is developing an online test proctoring system to monitor students during remote examinations. As part of the development team, you need to implement the core monitoring and alert system.

Expectations and Guidelines: ā— Time Allotted: 90 minutes ā— Internet Usage: You may use the internet only for syntax references. ā— Programming Language: You may use any language of your choice. ā— External Libraries: Do not use any external libraries. All code should be written by you. ā— Make sure that you have working and demonstrable code for all requirements. ā— Use of proper abstraction, separation of concerns is required. ā— Code should easily accommodate new requirements with minimal changes. ā— Proper exception handling is required. ā— Code should be modular, readable and unit-testable.

Important Notes: ā— Do not use any database store, use in-memory data structure. ā— Do not create any UI for the application. ā— Do not build a Command line interface. Executing test cases or a simple Main function should be sufficient. ā— Do not make any assumptions; please ask if clarification is needed.

Evaluation Metrics: Your code will be evaluated based on: ā— Functional Correctness ā— Completeness ā— Exception Handling ā— Design Pattern Implementation

Platform Capabilities:

  1. Students can register for online tests with their unique ID, name, and email.
  2. Tests are defined with a unique ID, subject, duration, and start time.
  3. The system monitors various activities during a test: ā—‹ Tab switching (browser tab changed) ā—‹ Focus loss (student not looking at the screen) ā—‹ Multiple faces detected ā—‹ No face detected ā—‹ Suspicious object detected
  4. Each activity type has a severity level: ā—‹ LOW: Warning only (focus loss < 5 seconds) ā—‹ MEDIUM: Potential cheating (multiple tab switches, focus loss > 5 seconds) ā—‹ HIGH: Definite violation (multiple faces, suspicious objects)
  5. The system should generate alerts based on these activities: ā—‹ For LOW severity: Record the incident and continue ā—‹ For MEDIUM severity: Issue a warning to the student ā—‹ For HIGH severity: Flag the test for review and notify the proctor
  6. After 3 MEDIUM severity incidents or 1 HIGH severity incident, the system should automatically pause the test and require proctor intervention. Bonus Capabilities:
  7. Implement a time-weighted severity system where repeated violations in a short timeframe escalate severity.
  8. Add a feature to record snapshots (text representation) at regular intervals for later review.
  9. Implement an appeals system where students can provide explanations for flagged activities.
  10. Add a statistical analysis feature to identify unusual patterns across multiple students taking the same test. Test Cases:
// Register Students 
RegisterStudent("ST001", "Vikram Singh", "vikram@example.com") RegisterStudent("ST002", "Anjali Desai", "anjali@example.com") 
// Create Tests 
CreateTest("TEST001", "JEE Advanced Physics", 180, 1723116023) CreateTest("TEST002", "NEET Biology", 120, 1723126023) 
// Register Students for Tests 
EnrollStudentInTest("ST001", "TEST001") 
EnrollStudentInTest("ST002", "TEST001") 
EnrollStudentInTest("ST002", "TEST002") 
// Start Tests 
StartTest("ST001", "TEST001", 1723116023) 
StartTest("ST002", "TEST001", 1723116023)
// Record Activities 
RecordActivity("ST001", "TEST001", "TAB_SWITCH", 1723116100) RecordActivity("ST001", "TEST001", "FOCUS_LOSS", 1723116200, 3) // 3 seconds 
RecordActivity("ST001", "TEST001", "FOCUS_LOSS", 1723116300, 10) // 10 seconds 
RecordActivity("ST002", "TEST001", "MULTIPLE_FACES", 1723116400) 
// Get Student Violations 
GetViolations("ST001", "TEST001") 
// Expected: 2 violations (1 LOW, 1 MEDIUM) 
// Check Test Status 
GetTestStatus("ST001", "TEST001") 
// Expected: ACTIVE with warnings 
GetTestStatus("ST002", "TEST001") 
// Expected: PAUSED (due to HIGH severity violation) 
// Generate Proctor Report 
GenerateProctorReport("TEST001") 
// Should list all violations by all students in the test

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!