I had three virtual interviews each of 45 mins.
LP questions
Tell me about yourself
Tell me about your most Challenging project you worked on.
follow up : explain me your part and outcome
Goal you achieved
I told him that I have published a game on Google Play store and he went to play store to check if I was telling the truth. So be sure that you have some sort of proof like github repo, live site etc.
Coding
Write a program to implement the find function used in the Linux system.
Two criteria :
find all files in the given directory and its subdirectory with .xml extension
find all files in the given directory and its subdirectory with size greater than given size
he did not give me any specifics what is the input or output and told me to think as if you are writing the library and someone else is going to use it. So you can decide what input and output you want.
so I just created two functions findByName() and findBySize()
the code I wrote for findByName()
public List<String> findByName(File directory){
List<String> result = new ArryList<>();
if(directory==null) return
if(directory.isDirectory()){
List<File> list = direcoty.getList();
for(File f: list){
if(f.isDirectory()){
List<String> sub = findByName(f);
result.addAll(sub);
}
else{
String name = f.name();
String[] parts = name.split(".");
if(parts[parts.length-1].equals("xml")){
result.add(name);
}
}
}
}
return result;
}he was somewhat satisfied with my answer but he wanted it to be more concise and extendable but we were out of time so I couldn't do it.
LP questions
Tell me about yourself
Tell me a time when you had to take a decision quickly and how it impacted
Tell me about your most challenging project
Coding (He gave me two questions wasn't expecting that but the questions were from leetcode so I could finish them in time.)
1st question (but also consider diagonal elements)
https://leetcode.com/problems/number-of-islands/
2nd question
https://leetcode.com/problems/recover-binary-search-tree/
The interviewer was satisfied with my answers
LP Questions
Tell me about a time when you were halfway through the project and you had to change the requirement.
Coding Question
(The most confusing and vague question)
This was an open-ended question
I want an object in which I could store a datatype.
I should be able to perform the following operation
1. remove the oldest data and read the content
2. remove the just added data and do not read the content
3. I want all the content I added in the same order
I asked him a few questions but he was like I can't say and you can do whatever you want. (That made me even more nervous)
I created a class which stores List and functions which performed above operations and then he also asked me to write Junit testing for the code (Wasn't expecting that) I did that too. I could not tell if he was satisfied or not, he wasn't very interactive either.
That's about it.
Update: received an offer on 8th jan.