Round 1
Questions:
-
You are given a list of
N
strings where each string denotes arrival time of theith
train, and one more string denotingcurrent_time
, find the minimum wait time for catching the next upcoming train corresponding to the current time. Return0
if there are no more trains available past current time. -
Given a matrix, output the sum of elements whose
index
is divisible by 3 in spiral order. -
You are given a task with
Q
queries and an integer inputlimit
, where each query can be either of the following:+X
: Add valueX
to the list-X
: Remove first occurringX
from the list
Initially, the list should contain zero elements. For each query, perform the given operation and find the total number of pairs in the list such that their absolute difference is equal to
limit
. Return the list of output for allQ
queries.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.