This was an in-office, face-to-face hiring drive for Senior Software Engineer role. (Data Platform org)
Round 1: (1.5 hours)
Java Questions:
class CustomKey {
private int id;
private String name;
public CustomKey(int id, String name) {
this.id = id;
this.name = name;
}
}
public class Test {
public static void main(String[] args) {
Map<CustomKey, String> map = new HashMap<>();
map.put(new CustomKey(1, "Alice"), "Value1");
map.put(new CustomKey(2, "Bob"), "Value2");
map.put(new CustomKey(3, "Charlie"), "Value3");
System.out.print(map.get(new CustomKey(1, "Alice")));
}
}
CustomKey a = new CustomKey(1,”Alice”)
a = new CustomKey(2, “Pasco”)
test(a);
sout(a.id)
test1(a);
sout(a.id)
Public void test(CustomKey a){
a = new CustomKey(4, “Bob”)
}
Public void test1(CustomKey a){
a.id = 3
}
Round 2: (50 mins)
All the rounds were elimination rounds, and the third round would have been the Hiring Manager round, had I not been eliminated.
Unlike leetcode where template is provided, working code was expected, starting from the initialization of trees/linked lists to the template function and its core logic.
Verdict: Rejected