ServiceNow | Senior Software Engineer | Round 1 | SSE Interview Experience

Anonymous User
266
May 17, 2024
May 17, 2024

About past project experiances, current roles and responsibilities. Current project functionality disccussion

below are the questions asked

  1. matrix with 0's & 1's, sort all 0's to the left and 1's to the right
    ex: {0,1,0,1,1,0,0,1} -> {0,0,0,0,1,1,1,1}

  2. sql query to get the department name of the employee whose second highest salary
    select d.dname from dep
    where depid in (select e.depid from emp e join dep d where e.depid = d.did order by e.sal desc limit 1,1)

  3. provided sample webserver access log and asked to provide approach for top 3 most requested url's

  4. g() -> may or may not take much time to process
    log.info(" some function call") -> log1
    log.info(" some function call")-> log2
    log.info(" some function call") -> log3
    all logs call to same function call
    log1 - 1ms
    log2 - 1ms after log1
    log3 - 15ms after log2

    possible rootcause for log3 getting delyed dispite calling the same function as log1 & log2

  5. table-> col(date) having index, does this have impact on below query

select count(*)from table where yr=2024

  1. code to manupilate given number to represent in no.of digits to second input number
    mem(100,5) -> 00100 (output)
    mem(99,3) -> 099 (output)
    ex: 100,5
    100 length -> 3
    convert 100 to 5 digit number -> 00100
    100 being original number and append 0's to the left most to match it to 5 digit number
    99,3
    99 length -> 2
    convert 99 to 3 digit number -> 099
    99 being original number and append 0's to the left most to match it to 3 digit number
Comments (3)