Current Exp - 2+ year
I applied for ServiceNow through carrer portal and the recruiter contacted me next day.
Call from recruiter: She was polite and said there will be three rounds of interview.
Round 1: (DSA & Technical)
-> given code snippet of javascript and asked to debug
asked about let, var, const
var temp = 'hi'
function display () {
console.log(temp);
var temp = 'bye';
};
display();follow up question - if var is replaced by let.
-> asked about javascript hoisting
-> Virtual DOM
-> one dsa question
arr[] = {1, 6, 11, 16, 21, 31};
this array has AM series
and one element will be missing except first and last
find missing element
I explained my brute force approach
private static int func(int[] arr) {
int i = 0;
int len = arr.length;
int diff = (arr[len - 1] - arr[0]) / (len);
for(i = 0; i < len - 1; i++) {
if(arr[i] + diff != arr[i + 1]) {
break;
}
}
return arr[i] + diff;
}
public static void main(String []args){
int arr[] = {1, 6, 11, 16, 21, 31};
int res = func(arr);
System.out.println(res);
}where d = l - a / n - 1; by AM formulae of finding last term
Time complexity - O(N)
Space complexity - O(1)
She asked to further optimise it
i explained binary search approach and she asked to explain the complexity
Time complexity - O(log N)
Space complexity - O(1)
-> another dsa question,
input: S = banana, T = ban, Output: 3
input: S = Sosasossos, T = sos, Output: 6how many ways we can make T from S
Unable to find the logic ☹️ (later i realises i was thinking the right logic, but unable to tell ☹️ actually question was this - Count distinct occurrences as a subsequence)
-> In github, we push the code and without refresh it is being updated in real time, she asked how it is ?
i was stuck, i gave one approach she said it is similar but think more.
I don't know how interview was, i am very scared, because i was expecting some design pattern, java or sql questions but she was more align towards frontend ☹️
Got rejection email next day :(
** Update: Another Recruiter scheduled my Interview Again**
Round 1: (DSA & Technical)
- Product Array except self (https://leetcode.com/problems/product-of-array-except-self/)
- Median of Running data stream (https://leetcode.com/problems/find-median-from-data-stream/description/)
- Design Counter with proper css in React js having functionality that if we do any action(increment / decrement), It should block the action for next 5 sec, after 5 sec you can do action
i completed DSA questions, for react js question, i was unable to implement setInterval(), later he asked some css to implement some i did some part, but some part, i was very close to it
Overall, It went well :)
Update: Got Rejection email again :(
I tried my best this time and coded DSA questions well also
Overall interview was good, still they rejected without any feedback


