Reading Material-
Split an array into chunks with a specified size. Code Template -
https://onlinegdb.com/Ptod_C-qS Ask candidate to fork this code Ensure the
candidate fork is given the detailed feedback Ensure the candidate output is copy
pasted into the detailed feedback Example - array = [1,2,3,4,5] chunkSize = 1 [1] [2]
[3] [4] [5] chunkSize = 2 [1, 2] [3, 4] [5] chunkSize = 3 [1, 2, 3] [4, 5] chunkSize = 4
[1, 2, 3, 4] [5] chunkSize = 5 [1, 2, 3, 4, 5] chunkSize = 6 [1, 2, 3, 4, 5]
Find common characters between strings Code snippet -
https://onlinegdb.com/2_k3E2v6H Ask the candidate to fork the above code The
candidates response url must be added in the comments Example: string1 = "abc";
string2 = "dcb"; common characters = "bc";
Can one use an Employee
class as a key in a HashMap?
(This is a very important
question. If this is not
answered satisfactorily, mark
the candidate as knowledge
gap as best case scenario
irrespective of answers to
other questions / scenarios)
Employee Table -- Id -- Name
-- Salary -- Department id
Find one employee from each
department who is getting the
highest salary within his
department. Discuss further
on server side pagination,
boundary cases like 2 emp
getting the same salary in the
same department which is
highest etc.
Consider a class A with a
synchronized method class A
{ public void synchronized
m1() {Thread.sleep(5000);} }
We create two objects of this
class - o1 and o2. We call
o1.m1() on one thread and
o2.m1() on another thread, at
the same time. What will be
the behaviour? Follow up
with - how will you force
these calls to execute one after
the other