Ist Round - Hackerrank test
clearwater.java | |
File Size: | 2 kb |
File Type: | java |
Above is the attached file having the questions I got as part of first round & it was having 4 questions to complete in 90 minutes.
2nd Round - Zoom video call
Here I was asked to provide the solution for the questions shared via Hackerrank platform.
In total in this 45 minutes call I was given 3 questions, these are not difficult, except the 3rd one which is tricky & becomes difficult to solve in such times. I hope, if you can tell the approach should be fine in those 15-20 mins. Though I am not sure if telling the approach only works, it will be your luck if your interviewer is fine with that, as I understand that there is a big difference between knowing the approach & implementing that approach.
Ques1 : Find if the list of numbers has duplicates.
Ans : It was same as given in attached file.
Ques2 : Some code was already present, & I was asked to make the necessary changes for their requirements.
Ans : I refactored the code as per their requirements.
Ques3 : Given a string comprised of lowercase letters in the range ascii[a-z], determine the length of the shortest substring that contains all of the letters present in the string.
Example:
s = dabbcabcd
The list of all characters in the string is [a, b, c, d].
Two of the substrings that contain all letters are dabbc and abcd.
The shortest substring containing all the letters is 4 characters long.
Write the code in your preferred Language to implement the above.
Ans : I was not able to implement that & I simply told my approach to them. It took me 2 hours to do the implementation for that as below. I have not tested properly & just tested for 3-4 cases. Please let me know the case for which it is failing.
Plus, please do post the optimised or better implementation, as below one is not optimised & needs enough improvement.
Below cases I tested for this code & have attached the results against the inputs. As we need to return the size, so output should be in size. Below I have written that one, for the shortest strings, you can return its size.
// String str = "ddabbcabcd"; //4
// String str = "abcabcaccabacd"; //4
String str = "abcabcaccabaccadb"; //6
// String str = "bab"; //2
It is like - https://leetcode.com/problems/minimum-window-substring/
In total in this 45 minutes call I was given 3 questions, these are not difficult, except the 3rd one which is tricky & becomes difficult to solve in such times. I hope, if you can tell the approach should be fine in those 15-20 mins. Though I am not sure if telling the approach only works, it will be your luck if your interviewer is fine with that, as I understand that there is a big difference between knowing the approach & implementing that approach.
Ques1 : Find if the list of numbers has duplicates.
Ans : It was same as given in attached file.
Ques2 : Some code was already present, & I was asked to make the necessary changes for their requirements.
Ans : I refactored the code as per their requirements.
Ques3 : Given a string comprised of lowercase letters in the range ascii[a-z], determine the length of the shortest substring that contains all of the letters present in the string.
Example:
s = dabbcabcd
The list of all characters in the string is [a, b, c, d].
Two of the substrings that contain all letters are dabbc and abcd.
The shortest substring containing all the letters is 4 characters long.
Write the code in your preferred Language to implement the above.
Ans : I was not able to implement that & I simply told my approach to them. It took me 2 hours to do the implementation for that as below. I have not tested properly & just tested for 3-4 cases. Please let me know the case for which it is failing.
Plus, please do post the optimised or better implementation, as below one is not optimised & needs enough improvement.
Below cases I tested for this code & have attached the results against the inputs. As we need to return the size, so output should be in size. Below I have written that one, for the shortest strings, you can return its size.
// String str = "ddabbcabcd"; //4
// String str = "abcabcaccabacd"; //4
String str = "abcabcaccabaccadb"; //6
// String str = "bab"; //2
It is like - https://leetcode.com/problems/minimum-window-substring/
3rd Round - Zoom video call
I had this another interview session & it was more about the leadership skills & to understand the candidate & the kind of work candidate has done.
Question1 : On what technologies you have worked in your career majorly?
Question2 : How much experience do you have in leading the team? What team size you have lead?
Question3 : Have you done the appraisals for the team members? How will you resolve the conflict with the team members
regarding the ratings you give?
Question4 : How will you deal with the client, if you are not able to deliver the agreed task on time?
Question5 : What your team members say about you?
Question6 : What steps will you take to get the required information from a DB having hundred tables?
Question7 : Have you ever worked on scaling up the DB? What projects you have done from scratch?
Question8 : What projects or work have you done apart from your company tasks?
In the end, do you have any questions to ask about the company or the opportunities in company?
Question1 : On what technologies you have worked in your career majorly?
Question2 : How much experience do you have in leading the team? What team size you have lead?
Question3 : Have you done the appraisals for the team members? How will you resolve the conflict with the team members
regarding the ratings you give?
Question4 : How will you deal with the client, if you are not able to deliver the agreed task on time?
Question5 : What your team members say about you?
Question6 : What steps will you take to get the required information from a DB having hundred tables?
Question7 : Have you ever worked on scaling up the DB? What projects you have done from scratch?
Question8 : What projects or work have you done apart from your company tasks?
In the end, do you have any questions to ask about the company or the opportunities in company?
A word of advice, if there is Indian manager in this behavioral or managerial round then don't speek truth & try to sugar coat your words to give that person a good positive person, else you are rejected same moment.
Similar experience I had with HCL manager for Google project & I still wonder that why such sh*t is there?
Similar experience I had with HCL manager for Google project & I still wonder that why such sh*t is there?