Demand Base | Interview Experience | 4 yrs experience
Anonymous User
544

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:

  1. Final, Finallize, Finally difference
  2. Garbage collection
  3. Output of the below code, also in the below code write the logic to have custom hashing.
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")));
   }
}
  1. Difference between Authetication and Authorization.
  2. Discussion around hashmap hash and how the value is stored and it's time complexity.
  3. What doFilter is used for.
  4. Garbage collection
  5. Output of

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
}
  1. Discussion on pass by reference, pass by value.
  2. There were few more java specific questions I am unable to recall.
  3. Given an array return maximum product of three elements. (discussion on Edgecases)
  4. Write code for lowest common ancestor in a binary tree.

Round 2: (50 mins)

  1. Given a string s1, convert the string to s2 , return the minimum operations needed to convert s1 to s2. (Question was very vague, needed to clarify the exact ask)
    Operations:
    Replace
    Add
    Delete
    Swap
    Substitute
  2. Merge k sorted linkedlist using priority queue.
    (I was unable to solve the first q, wrote unoptimized working code for the second q)

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

Comments (0)