Bloomberg | Phone
Anonymous User
9178
Jun 15, 2020
Jun 24, 2020

I had two first rounds interviews for Sr. Software engineer position. I wrote my code in C#

Details

  1. Duration - 1 Hr

  2. Pattern

    • Team background was 5-7 mins
    • Candidate introduction and interesting project (optional) 5-10 mins
    • One Coding problem on HackerRank with 2-3 follow up.
    • Candidate questions to the interviewer.
  3. Questions

    • Given a collection of opening and closing braces, determine if a string containing alphanumeric data along with the braces is valid. Follow up was to not hard code the braces(use data Structure),valid tests for this code and how to write the objects to facilitate testing.Runtime and space complexity discussion.

    • Input a = [21,5,6,56,88,52], output = [5,5,5,4,-1,-1] . Output array values is made up of indices of the element with value greater than the current element but with largest index. So 21 < 56 (index 3), 21 < 88 (index 4) but also 21 < 52 (index 5) so we choose index 5 (value 52). Same applies for 5,6 and for 56 its 88 (index 4). If there is no greater element then use -1 and last element of the array will always have value of -1 in output array since there is no other elment after it. Follow up to consider the input as a stream, how can we only update smaller element (use specific Data structure), running time and space complexity discussion.

Updated the details.

Comments (26)